Svante Signell, le Mon 02 Mar 2015 08:29:55 +0100, a écrit : > Well the basic problem is of course to detect processes generated by > fork(2).
?? > Is it possible to find those processes having PID 0, generated from > fork, e.g. with proc_getallpids() ? ?? > Or are they getting a PID>0 with subsequent calls to exec*? ?? I guess you need to read again some handbook about Unix' fork(): it just creates a second process. The original process is still there (the parent), and its fork() call returns the pid of the second process. The new process (the child), the fork() call returns 0. There's no hidden process in there, and the fork hook should get you done. But again, I'm still unsure why you believe that locks are being inherited through fork(): before introducing a fork hook to forcibly unlock something, one needs to be absolutely sure that it's actually locked. Actually it'd even look like a design flaw if two process could actually hold a lock on the same piece of a file... Samuel