Closed jmazanec15 closed 5 years ago
Right now, there is a problem with argument passing in the call to process_wrun. I have merged the changes in argv-repair, but I get the following error running runwintst.exe: The arguments are supposed to be printed after the "elf:" in the error message but it seems like they are null.
Please have the parent process open the window (so it can own it) and then process_wrun dups the file descriptor into the child's table.
Just updated wrun syscall to take in the wd it wants the child process to have as its standard window. runwintst.c was also changed and shows the behavior of how a user process would use wrun.
@jmazanec15 you gave a nice demo of this today, but perhaps the code wasn't pushed?
I may have made these changes in the window manager PR. I will merge that one and close this one.
Added a system call, process_wrun, that allows a parent to run a child process in a window specified by the parent. The handle looks like this:
It is similar to process_run, except that a parent passes the window_description array, which holds the x position, y position, width and height of the new window to be made. It also passes the file descriptor of the window, wd, that the parent wants to create the new window out of.
In the implementation, the syscall first creates the new window. Then, similar to process_run, it creates the new process and the new process inherits all of the descriptors from the parent. Following this, the new window is duplicated over the child's standard window, fd=3 and then the original descriptor of the new window for the child and parent is closed. This way, the parent can control the standard window the child gets and no other children will inherit the child's standard window.
This system call will be used in the window manager program to contain processes running at the same time in their own separate windows.