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;
|
return 5;
|
||||||
}
|
}
|
||||||
fscanf( fh1, "%s", str);
|
fscanf( fh1, "%s", str);
|
||||||
pch = strtok( str, "=" );
|
pch = strtok( str, "=\0" );
|
||||||
pch = strtok( NULL , "=" );
|
pch = strtok( NULL , "=\0" );
|
||||||
sprintf( user, "%s", pch);
|
sprintf( user, "%s", pch);
|
||||||
fclose(fh1);
|
fclose(fh1);
|
||||||
return retval;
|
return retval;
|
||||||
@ -195,7 +195,7 @@ int main()
|
|||||||
//printf("%i", pid);
|
//printf("%i", pid);
|
||||||
|
|
||||||
//get the list of children
|
//get the list of children
|
||||||
if ( getpids( pid, pids ) != -1)
|
if ( (n=getpids( pid, pids )) != -1)
|
||||||
{
|
{
|
||||||
for ( y=0; y<=n; y++)
|
for ( y=0; y<=n; y++)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user