Process identifier (PID) file of node not generated when launched [closed]

asked 2012-09-26 23:44:47 -0500

I'm trying to launch a node with the --pid option to obtain a file with the pid of the process, like in this example:

nohup python -u `rospack find roslaunch`/bin/roslaunch --wait --pid=/tmp/pid_file $* &> /tmp/${1}.roslaunch.log &

By launching our processes like this, we observe that sometimes the pid file is generated but whithout the pid value inside (empty file). We observed that this problem usually happens when the CPU load is very high.

I don't know who is responsible of generating the pid (either ROS infrastructure or something in the linux kernel). The thing is that the same behavior (more or less) can be observed if we use the following command to generate the pid file:

nohup python -u `rospack find roslaunch`/bin/roslaunch --wait $* &> /tmp/${1}.roslaunch.log &
echo $! > /tmp/pid_file

That smells like something in the kernel behavior, but not sure. Any idea why the pid is not generated?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2014-08-17 04:17:41.814384