//------------------------------------------------------------------- // loadonly.cpp // // This program uses the Linux 'ptrace()' facility to launch a // designated application program in the 'TASK_STOPPED' state. // // usage: $ loadonly // // programmer: ALLAN CRUSE // written on: 05 AUG 2004 //------------------------------------------------------------------- #include // for perror() #include // for execve() #include // for ptrace() int main( int argc, char **argv ) { if ( ptrace( PT_TRACE_ME, 0,0,0 ) ) perror( "ptrace" ); else if ( execve( argv[1], argv+1, 0 ) ) perror( "execve" ); }