Discussion:
Add parameter Sys_Spawn
(too old to reply)
will
2005-09-12 22:08:32 UTC
Permalink
Hi guys.

The spec says we should add a parameter to Sys_Spawn that indicates whether a process should be run
in the background or not. However, this information is already available in the first parameter that
gets passed in. The documentation for the Sys_Spawn method says
"state->edi == whether to spawn in the background"

Furthermore, the shell doesn't directly call Sys_spawn, but instead calls one of the "Spawn_with" methods,
which in turn call Sys_spawn. Without giving away more than I'm allowed to, shouldn't we be modifying one
of the methods the shell should access? If we actually are supposed to do it as the spec said, isn't it a
bad idea to expose Interrupt_State to the shell process?

This is all in reference to the line in the spec
"modify the Sys_Spawn system call to take an additional argument"

Thanks

-Will
Saurabh Srivastava
2005-09-13 15:09:20 UTC
Permalink
| The spec says we should add a parameter to Sys_Spawn that indicates whether a process should be run
| in the background or not. However, this information is already available in the first parameter that
| gets passed in. The documentation for the Sys_Spawn method says
| "state->edi == whether to spawn in the background"

The documentation is to help you figure out which register to use (saving
you some time which would otherwise be spent going through the headers and
the manual to figure out which one it is). If you notice the code below it
doesnt use the edi register. So the Sys_Spawn call as of the moment does
not support backgrounding. You need to write the code to use the
state->edi register.

|
| Furthermore, the shell doesn't directly call Sys_spawn, but instead
| calls one of the "Spawn_with" methods, which in turn call Sys_spawn.
| Without giving away more than I'm allowed to, shouldn't we be
| modifying one of the methods the shell should access? If we actually
| are supposed to do it as the spec said, isn't it a bad idea to expose
| Interrupt_State to the shell process?

What do you mean by exposing the Interrupt_State. You new syscall would
take more parameters at the user level (and to facilitate this you will
need to change the header which declares its arguments etc as well). The
Spawn_with... methods are just user level local methods for shell.c. Their
modification will be required but given that they are just wrappers that
is a no-issue.

Loading...