debug
This commit is contained in:
parent
af146615e8
commit
69d73a85bd
6
main.c
6
main.c
@ -122,8 +122,8 @@ int getprocinfo( int ppid, char cmdline[], char cmd[], char user[] )
|
||||
return 5;
|
||||
}
|
||||
fscanf( fh1, "%s", str);
|
||||
pch = strtok( str, "=" );
|
||||
pch = strtok( NULL , "=" );
|
||||
pch = strtok( str, "=\0" );
|
||||
pch = strtok( NULL , "=\0" );
|
||||
sprintf( user, "%s", pch);
|
||||
fclose(fh1);
|
||||
return retval;
|
||||
@ -195,7 +195,7 @@ int main()
|
||||
//printf("%i", pid);
|
||||
|
||||
//get the list of children
|
||||
if ( getpids( pid, pids ) != -1)
|
||||
if ( (n=getpids( pid, pids )) != -1)
|
||||
{
|
||||
for ( y=0; y<=n; y++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user