Programming :: Make System Call From An Automatically Started Daemon?

Apr 2, 2011

i've written small tool in C which makes measurements on my router (OpenWrt White Russian).

It is working as a deamon. If the tool is started manually, everything works fine. If it is started per script on startup, the following system call doesn't work :

Code: sprintf(command,"/bin/cat /root/%s%s | /usr/bin/ssh -p2222 user(at)host -i /root/.ssh/id_rsa "/bin/cat >> result/%s%s"", apmac, source, apmac, dest);

rc = system (command); the returned rc in this case is 256.

first i thought it is a problems with the user rights for the tool, so i have added +s to it. but that didn't help. as i said, when the daemon is started by hand, the system call works fine.

View 1 Replies


ADVERTISEMENT

Programming :: C / C++ Scripts For Make Hunting Call In Open IMS

Nov 15, 2010

I am a newbie in linux n programming, I need to use ubuntu for my research at school about building an IMS server use openims.

The problem is I need an additional script in C/C++ for my openims server to make an extension call. I hope one number can represent 3 client as receiver/operator. So, when I call the number, the server can forward the call to those three receiver by hunt.
1st call will be forward to the 1st receiver.
2nd call will be forward to the 2nd receiver.
3rd call will be forward to the 3rd receiver.
then, 4th call will be forward back to the 1st receiver, etc.

View 7 Replies View Related

Programming :: Implement A System Call For Displaying The System Statistics

Nov 6, 2010

I have been assigned to implement a system call that report the system statistics over all memory which are

Total Pages in Active LRU list
Total Pages in Inactive LRU List

View 1 Replies View Related

Programming :: Execvp System Call?

Apr 3, 2011

in below program why was new_args[0], rather than the reference the_cmd, passed to the execvp system call?

Code:
/*
A _very_ limited shell program

[code]....

View 2 Replies View Related

Programming :: Clarification In The Select System Call?

Dec 8, 2010

I have a process that forks, where the childs puts some data of random size and exits while the parent should get the data and does some manipulation.. here I have used a pipe for child to write the data and parent to read the data.. Child simply dumps the data, and the data is of any size even child and parent doesnt know.
I have used select in the parent to see whether there is any data coming on the reading end of the pipe.. if there is a data.. I copy into a buffer.. Im reading the data continusly when the child exits after closing the writing end of pipe. Parent gets blocked on the read part But my question is how parent know the other of pipe is closed when using the select call. In otherwords.. while using select in readfds, how would i know the other end has closed the pipe..

View 2 Replies View Related

Programming :: C - System Call & Error Checking?

Sep 18, 2010

I am trying to figure out how i would go about finding out where system call is made and error checking is not done. I have code below, if somebody can point me in the right direction where system call is made but error checking is not done.Quote:

#include "shell.h"
#include <stdio.h>
#include <string.h>

[code]....

View 5 Replies View Related

Programming :: How To View New Added System Call

Aug 30, 2010

I successfully added a new system call in CentOS Kernel but I don't know where to view it! My kernel version is -2.6.32.5

View 2 Replies View Related

Programming :: Process Of Creating System Call?

Mar 24, 2011

how to create a new system call Linux? what is the process of creating ?my project is to create a system call for displaying owner of a file..where exactly we have to write the system call code? and where are the places need to change ?

View 5 Replies View Related

Programming :: Test New System Call Before Compiling Kernel?

Apr 2, 2009

I want to test my system call that be goint to add to kernel, But when i finish compiling kernel, i found my system call code not work. the code i want to return the system time "struct timespec":

/*----------Start of mycall.c----------*/
#include <linux/linkage.h>
#include <linux/time.h>
#include <linux/kernel.h>

[code]....

so i want a method to test the new system call before compiling kernel.

View 2 Replies View Related

Programming :: Sleep Call Causes Whole GNU System To Hang Indefinitely

May 6, 2011

Anyone know the reason why a sleep( ) on a Redhat Linux OS would cause the system to indefinitely hang? It's doing this every 10 or so calls in my program and I have to press the reboot button on my computer. My program is reading from a UDP port that has messages sent to it 20 times per second. When I sleep I assume the internal UDP buffer is getting more and more filled.

View 14 Replies View Related

OpenSUSE Install :: Gnome-settings-daemon Is Not Started?

Dec 10, 2009

After I login my desktop preferences are not loaded. If I try to change them (Control cneter-> apparence) I get a message that says: Unable to start the settings manager 'gnome-settings-daemon'.Without the GNOME settings manager running, some preferences may not take effect. This could indicate a problem with DBus, or a non-GNOME (e.g. KDE) settings manager may already be active and conflicting with the GNOME settings manager.The first lines of .xsession-errors show:

/etc/X11/xim: Checking whether an input method should be started.
HOSTNAME: Undefined variable.
XDG_DATA_DIRS: Undefined variable.

[code]....

View 5 Replies View Related

Ubuntu Servers :: Evaluate What Started The MySQL Daemon?

Oct 13, 2010

I installed MySQL on my Ubuntu 10.04 desktop. As I need it only once a month I removed it from all runlevels but mysql is still running after boot up. "lsof" shows that it is running and listening for connections.

Code:
neo@ubuntu:~$ sudo lsof -i
[sudo] password for neo:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sshd 927 root 3u IPv4 7819 0t0 TCP *:ssh (LISTEN)
sshd 927 root 4u IPv6 7821 0t0 TCP *:ssh (LISTEN)
avahi-dae 945 avahi 12u IPv4 8107 0t0 UDP *:mdns
avahi-dae 945 avahi 13u IPv6 8108 0t0 UDP *:mdns

[Code]...

How can I evaluate what started the MySQL daemon? WHy is it running?

View 1 Replies View Related

Programming :: Unpredictable Behaviour With Send/recv System Call?

Jul 30, 2011

I am making a library, but I am facing a strange problem while sending data over network using ethernet.

I am sending 39 bytes of the data from one server to slave application but some time slave receives 39 bytes and some time it receives 29 bytes. And when ever slave receives 29 bytes all the memories to which my pointers are pointing get changed. This problem is only when I am sending data from the server to slave, while sending data from slave to server I am facing no such issue.

View 10 Replies View Related

Programming :: Using Scripts In System Call In Applicationand Want Script's Output

Sep 8, 2010

I have a script for dd command and i am using it in an application using system() call. Now i want to have the output of the script file (i.e output of dd command) in the application file itself.

View 1 Replies View Related

Ubuntu :: When Click On The Ibus Icon Always Get A Message - Daemon Is Not Started

Apr 29, 2010

When I click on the Ibus icon, I always get a message:

Code:

IBus daemon is not started. Do you want to start it now?

I click yes, and I get:

Code:

IBus has been started! If you can not use IBus, please add below lines in $HOME/.bashrc, and relogin your desktop.

I have no idea how to add the amentioned lines to the amentioned file, I guess its via terminal, but I dont know what do I have to type

View 1 Replies View Related

Networking :: Piranha: Can't Ping Realserver When Pulse Daemon Started?

Jul 28, 2011

I'm trying desperately to get ipvs load balancing up and running using the RedHat Piranha utility.I'll post my config files later in the message.In order to simplify things, I've only got one LVS director running (no backup director), and I've only got one realserver running.I can ping the realserver static ip from the LVS director when the pulse daemon is NOT started.About one minute after I start the pulse daemon, I can no longer ping the realserver static ip.I can ping the realserver static ip from any other box on the subnetThe LVS app requires that the LVS director be able to ping (or CONNECT) the realserver as a sanity check to make sure the realserver(s) is/are still alive.

/var/log/messages entries:
Jul 28 10:49:21 emclb98 pulse[11281]: STARTING PULSE AS MASTER
Jul 28 10:50:51 emclb98 pulse[11281]: partner dead: activating lvs

[code]....

View 1 Replies View Related

Software :: Script That Call A Java Program That Call A System Command?

Nov 29, 2010

In practice I have a script that call a java program that call a linux system command. The script if I run it, from a shell functions well,so it is not a java problem. The problem come out when i put this script in a crontab schedulation. The result in this case is that java do not execute the system command. I think it depends on crontab

View 4 Replies View Related

Programming :: Poll() System Call Not Returning When The Socket Is Closed Locally?

Sep 29, 2010

we have a multi threaded program on Linux where one thread is waiting on poll() system call with event set to POLLIN, & another thread has closed the same socket fd (which is passed to poll) , but the poll() did not return, is this the expected behavior? From man page of poll we found that the poll should return POLLNVAL if the socket fd is closed, is my understanding correct or is there any bug in the poll()?In Solaris we observed that the poll system call is returning with POLLNVAL if the socket is closed.

View 3 Replies View Related

Programming :: Simple Example Document For Adding A System Call On Fedora 14 Kernel?

Nov 20, 2010

Does anyone have straightforward simple example document for adding a system call on fedora 14 kernel?

View 12 Replies View Related

Programming :: Working With System Call - Read Output And Parse Values

Dec 10, 2010

I have the following code:
Code:
#include <stdio.h>
#include <stdlib.h>
int main() {
system("ps -ef | grep myprocessname");
return 0; }

When I run this program it outputs the following list of running processes:
Code:
root 10279 10275 0 13:02 ? 00:00:00 myprocessname myvar1=value1 myvar2=value2
root 10341 10337 1 13:02 ? 00:00:00 myprocessname myvar1=value1 myvar2=value2

What I want to really do is instead of writing the output to screen I want to read the output and parse the various values value1, value2 etc. What is the best way to do this?

View 4 Replies View Related

Ubuntu :: Bluetooth And Skype \ Make A Call Using These Headphones With Skype, Can Speak For Say 10 Seconds And Then The Headset Disconnects Completely From The System?

Aug 12, 2010

I recently bought a IOgear USB bluetooth adapter and a Sony DRBT101/BLK bluetooth headphones to use with my computer.Whenever I try to make a call using these headphones with skype, I can speak for say 10 seconds and then the headset disconnects completely from the system. I then have to reconnect the headset by switching it off and on. I do not have this problem listening to music using A2DP. It works fine with my mobile phone.When I change the profile to Telephony Duplex (HSP/HFP), it shows up as hands free, I thought it should be headset in blueman manager. My friend uses Plantronics headset with is Dell laptop with built in bluetooth and he says his comes up as headset not hands free. Could this be causing the problem?

View 1 Replies View Related

Programming :: Bash - Automatically Build A Set Of Packages And Redirect Output Into Logs - Failed Make Should Return A Non-zero Value

Jun 27, 2011

I have a set of bash scripts that I'm running that automatically build a set of packages for me and redirect their output into logs. Basically, I have a bunch of lines that are something like this: ${CONFIGURE_DIR}/configure &> ${LOG_DIR}/log or cd ${CONFIGURE_DIR} && make &> ${LOG_DIR}/log, etc.

This is supposed to make the entire process silent. However, sometimes with some packages some output leaks to my console (either stdout or stderr). I'm thinking that maybe the configure scripts/make are executing commands within new shell instances that don't inherit my redirect, or something to that effect.

Another reason for thinking this is that in another part of my script I detect errors when running make by testing with "if [ $? -ne 0 ]", and if the redirect leaks to my console and also the leaked output indicates that the build failed ("make: Error" and so on), then my $? test fails (i.e., it thinks that $? == 0, whereas a failed make should return a non-zero value). It's as if my original script can't "see" the results from child commands executed from later scripts.

View 1 Replies View Related

OpenSUSE :: Plasma Desktop Is Loaded Automatically After KDE 3.5 Has Started?

Aug 22, 2010

I just updated both my KDE 3.5.10 and KDE 4.5 today (OpenSuse 1.11). The problem that I have now is that the Plasma Desktop is loaded automatically after KDE 3.5 has started. So, depending on where I click or what I do, plasma and kdesktop fight for the control of my desktop.

I searched in every corners of my KDE 3.5 --and a bit in KDE 4 since somebody forced kdm4 on me-- but I haven't found who or what starts "plasma-desktop". Definitively not me! I can kill it safely but that's very irritating.

View 3 Replies View Related

Ubuntu :: Delaying Startup Of Automatically Started Programs?

May 16, 2010

Recently I have had a run of random errors on boot up. Finally, the quit button, top right of the screen disappeared permanently. I am convinced it is because I added Evolution to the programs that start automatically when I login to Ubuntu (auto login). Evolution uses the Internet connection which hasn't been successfully established by the time it starts. In the past, this would crash Ubuntu. It seemed to be fixed by this stage, but maybe not. Is there some way of delaying the startup of a program in the automatic startup list - to give the rest of everything time to settle in - before it starts trying to use other startup resources?

View 3 Replies View Related

Programming :: Error 4 Which (according To /usr/include/asm-generic/errno-base.h) Means "interrupted System Call"

Aug 1, 2010

I'm using gmake (v3.81) to build some c executables. As the first step in the process I run the files through a preprocessor (for embedded SQL). The preprocessor completes successfully, but the gmake reports an error and discontinues buiding the remaining dependencies...

make *** [myfile.c] Error 4

which (according to /usr/include/asm-generic/errno-base.h) means "interrupted System Call". My preprocessor doesn't raise any signals, so I'm not sure what's causing this error.

View 2 Replies View Related

Ubuntu Networking :: Avahi-daemon Won't Start Automatically Sometimes?

Jan 25, 2010

Since I've updated to 9.10 my avahi-daemon sometimes won't start at boot.I've to "restart" it manually.I reinstalled it without success.Has anyone here the same problem? Or a useful solution?

View 1 Replies View Related

Ubuntu Servers :: Startup It Automatically Without Screen Daemon?

Jan 26, 2010

i am succesfully installed TeamSpeak 3 server and now i want to startup it automatically without screen daemon and on every startup on linux ubuntu 9.10 i am using this command for start the TS3 server:./ts3server_linux_amd64 dbplugin=ts3db_mysqlin home/user/Desktop/ts3server_linux_amd64

View 4 Replies View Related

Programming :: START And STOP Oracle Automatically On System Startup And Shutdown?

Aug 17, 2009

I have installed Oracle 11g on 5.3. Now, I am trying to START and STOP oracle automatically on system startup and shutdown. I am following this link To have this effect, I have created /etc/init.d/dbora

Code:

#!/bin/sh
# chkconfig: 345 99 10
ORA_HOME=/oracle/app/oracle/product/11.1.0/db_1

[code]....

View 4 Replies View Related

Ubuntu :: Automatically Start Lsyncd Daemon On Server Reboot?

Jun 14, 2011

My problem now is that lsyncd does not automatically start if the server reboots. I need lsyncd to start automatically also using the --delay 5 option.

I've had trouble finding any info on this other that some Japanese sites (I cant read japanese) using chkconfig, although it didn't work as I think chkconfig is depreciated anyway.

View 3 Replies View Related

Slackware :: 13.1 - NTP Daemon Don't Start Automatically And My Clock Is An Hour Late

Mar 29, 2011

I use Slackware64 13.1 and this Sunday the hour change and ntp daemon don't start automatically and my clock is an hour late. It's normal or a bug?

View 20 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved