aboutsummaryrefslogtreecommitdiffhomepage
path: root/proc.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2005-12-04 05:46:18 +1000
committerGravatar axel <axel@liljencrantz.se>2005-12-04 05:46:18 +1000
commit32e833f3319e279167e3c4cf50f73b5ff93e4d65 (patch)
tree9e97b8fe5b209fa0548fb642c142d2aca0fac8c1 /proc.c
parent9b4c34aa4c95a8d2c6703b7c04443f82f086d359 (diff)
Remove old event hooks, add more event handler documentation
darcs-hash:20051203194618-ac50b-e90683cb69b19da789152164a89a34bf187fd4e4.gz
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/proc.c b/proc.c
index 9bae4774..fb6229da 100644
--- a/proc.c
+++ b/proc.c
@@ -482,12 +482,9 @@ static void format_job_info( const job_t *j, const wchar_t *status )
fwprintf (stdout, L"\n" );
}
-static void fire_process_event( const wchar_t *msg, int type, pid_t pid, int status )
+void proc_fire_event( const wchar_t *msg, int type, pid_t pid, int status )
{
static event_t ev;
- event_t e;
-
- e.function_name=0;
ev.type=type;
ev.param1.pid = pid;
@@ -538,7 +535,7 @@ int job_reap( int interactive )
s = p->status;
- fire_process_event( L"PROCESS_EXIT", EVENT_EXIT, p->pid, ( WIFSIGNALED(s)?-1:WEXITSTATUS( s )) );
+ proc_fire_event( L"PROCESS_EXIT", EVENT_EXIT, p->pid, ( WIFSIGNALED(s)?-1:WEXITSTATUS( s )) );
if( WIFSIGNALED(s) )
{
@@ -596,8 +593,8 @@ int job_reap( int interactive )
found=1;
}
}
- fire_process_event( L"JOB_EXIT", EVENT_EXIT, -j->pgid, 0 );
- fire_process_event( L"JOB_EXIT", EVENT_JOB_ID, j->job_id, 0 );
+ proc_fire_event( L"JOB_EXIT", EVENT_EXIT, -j->pgid, 0 );
+ proc_fire_event( L"JOB_EXIT", EVENT_JOB_ID, j->job_id, 0 );
job_free(j);
}