[dtrace-discuss] Dtrace "fork()-o-meter" ...

Chip Bennett cbennett at laurustech.com
Sat Jan 13 21:47:49 PST 2007


Roland Mainz wrote:
> Chip Bennett wrote:
>   
>> #pragma D option quiet
>> syscall::*fork*:entry
>>     
>
> Note that just catching |fork()| is not enougth since some shells may
> use newer ways to spawn children (like |posix_spawn()| (if available and
> correctly working)).
>   
At present, I don't think there are any other ways to spawn in Solaris.  
posix_spawn is a library subroutine (for sure) that calls fork and exec 
(I assume).
> ... however if soneone wants to fix this please either get "-c" working
> as used in a POSIX shell or pass the whole string (command+arguments) to
> the |system()| call and let it parse the arguments (this should avoid
> another row of nasty suprises with things like ${IFS}&co.).
>
>   
Good idea, if do-able.  I vaguely remember some discussion about DTrace 
needing to "grap" the process in some way.   There may be a timing 
issue, or some dependency on the way the process is started that has to 
be maintained.  Anyone else know if having an alternate way of starting 
a process, that uses a shell to parse the command line, would be a 
burden to add as a new feature?

Chip


More information about the dtrace-discuss mailing list