Re: [solved] C program launched by start-stop-daemon fails to catch signals

2016-05-07 Thread CN
On Sat, May 7, 2016, at 02:43 PM, Christian Seiler wrote: > > No, it does catch the signal without a problem. But start-stop-daemon > closes the standard filedescriptors and replaces them with /dev/null. > > Try it: > > /tmp/t.sh start > ps ax | grep a.out > lsof -p $PID > -> look for FD = 0u, 1

Re: C program launched by start-stop-daemon fails to catch signals

2016-05-06 Thread Christian Seiler
On 05/07/2016 06:39 AM, CN wrote: > The following compilable C++ program catches signals as expected if it > runs directly from shell /tmp/a.out. > > However, this program fails to catch any signal and silently terminates > if it is fired by Debian's start-stop-daemon. No, it does catch the signa

C program launched by start-stop-daemon fails to catch signals

2016-05-06 Thread CN
nates. Instead, segmentation fault occurs from pthread libray.) --- ( Better code formatted message can be found here: http://stackoverflow.com/questions/37076470/c-program-launched-by-start-stop-daemon-fails-to-catch-signals ) File "/tmp/t.cpp": #include #include //si