http://qs321.pair.com?node_id=138539


in reply to Exec() and getting system PID

Is this the program you are using?

If so, are you sure you aren't using the "-f|-fork" option?

My guess is, you should use my $pidline = `root-tail -f ...` but for some reason, root-tail v0.0.10 has the line for printing the PID commented out...

pid = fork (); if (pid != 0) { /*printf ("forking mode: pid=%d\n", pid);*/ exit (0); }
(You may want to mail the devloper and ask what gives.)

However, if you don't use -f, the code you have above seems to work just fine.