exec & fork in a system call

exec & fork in a system call

Post by Marx Rajanga » Fri, 19 Feb 1999 04:00:00



Hi,

  I am trying to use execve() and fork() in a system call.
 I am trying to call sys_fork and sys_exec in my system call.
 But both these expect a pointer struct to be passed to them.

  struct pt_regs * regs

  that is defined in ptrace.h. I dont know how to fill the structure
 with the values. All the fields  in this struct are register fields.

  I would appreciate if someone could direct me in a proper direction.

  BTW, I am trying to fork and exec in a system call so that I can
 execute a binary(vi/emacs) by calling it from the system call.

 Thanks for the help.

--
Marx Rajangam
Fisher 227, CS Dept,
Michigan Tech. Univ.

 
 
 

1. exec & fork in a system call

Hi,

  I am trying to use execve() and fork() in a system call.
 I am trying to call sys_fork and sys_exec in my system call.
 But both these expect a pointer struct to be passed to them.

  struct pt_regs * regs

  that is defined in ptrace.h. I dont know how to fill the structure
 with the values. All the fields  in this struct are register fields.

  I would appreciate if someone could direct me in a proper direction.

  BTW, I am trying to fork and exec in a system call so that I can
 execute a binary(vi/emacs) by calling it from the system call.

 Thanks for the help.

--
Marx Rajangam
Fisher 227, CS Dept,
Michigan Tech. Univ.

2. Setting up Tektronix X-Terminals with a Linux Box

3. General Fork()/Exec()/System() Call Question

4. Locale support in PostgreSQL-7.0.2 for 2.8?

5. Fork and Exec system calls

6. Arg! MySQL Support For PHP...

7. Input across fork() and exec() calls

8. bugs in Sun's list of Recommended, Security, and Y2k patches

9. Efficiency: fork() w/ shared libraries vs. fork()/exec()

10. rsh in a system() or fork/exec on AIX

11. system(command) = fork + exec(command)? kill parent, children?

12. system() vs. fork/exec/waitpid

13. Q: fork() & exec() question