diff options
author | sabetts <sabetts> | 2003-05-15 07:36:21 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2003-05-15 07:36:21 +0000 |
commit | 55fadaecf93dfdf6a7c9510098057c5152e3b920 (patch) | |
tree | f1fc81a4aa497466f1cf5a497386ae994265984c /src/data.h | |
parent | 2d8945e4ee37ceee9d58e91681c6d3722a83c956 (diff) | |
download | ratpoison-55fadaecf93dfdf6a7c9510098057c5152e3b920.zip |
* src/data.h (struct rp_frame): renamed from rp_window_frame. All
dependant code updated.
* src/main.c: remove child_info global. Add rp_children global.
(chld_handler): update the terminated and status fields of any
terminated children.
* src/events.c (handle_signals): loop through each child process
and remove them from the list. Print a message for any child that
doesn't return a 0 status.
* src/data.h (rp_child_info): new fields, terminated and node.
remove child_info global. Add rp_children global.
* src/actions.c (spawn): Add the command to the list of children.
Diffstat (limited to 'src/data.h')
-rw-r--r-- | src/data.h | 28 |
1 files changed, 22 insertions, 6 deletions
@@ -49,9 +49,10 @@ typedef struct rp_window rp_window; typedef struct rp_screen rp_screen; typedef struct rp_action rp_action; -typedef struct rp_window_frame rp_window_frame; +typedef struct rp_frame rp_frame; +typedef struct rp_child_info rp_child_info; -struct rp_window_frame +struct rp_frame { int number; int x, y, width, height; @@ -123,7 +124,7 @@ struct rp_screen /* A list of frames that may or may not contain windows. There should always be one in the list. */ - struct list_head rp_window_frames; + struct list_head frames; /* Keep track of which numbers have been given to frames. */ struct numset *frames_numset; @@ -194,13 +195,28 @@ struct rp_defaults /* Information about a child process. */ struct rp_child_info { + /* The command that was executed. */ + char *cmd; + + /* PID of the process. */ int pid; + + /* Return status when the child process finished. */ int status; + + /* When this is != 0 then the process finished. */ + int terminated; + + /* This structure can exist in a list. */ + struct list_head node; }; -/* When a child process exits this structure holds the information - about it to be used to report back to the user. */ -extern struct rp_child_info child_info; +/* Each child process is stored in this list. spawn, creates a new + entry in this list, the SIGCHLD handler sets child.terminated to be + true and handle_signals in events.c processes each terminated + process by printing a message saying the process ended and + displaying it's exit code. */ +extern struct list_head rp_children; extern struct rp_defaults defaults; |