mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-28 04:51:15 -03:00
Mark a bunch of constructors as explicit
This prevents undesired implicit conversions
This commit is contained in:
29
src/proc.cpp
29
src/proc.cpp
@@ -354,8 +354,6 @@ int job_signal(job_t *j, int signal)
|
||||
|
||||
/**
|
||||
Store the status of the process pid that was returned by waitpid.
|
||||
Return 0 if all went well, nonzero otherwise.
|
||||
This is called from a signal handler.
|
||||
*/
|
||||
static void mark_process_status(const job_t *j, process_t *p, int status)
|
||||
{
|
||||
@@ -374,18 +372,7 @@ static void mark_process_status(const job_t *j, process_t *p, int status)
|
||||
{
|
||||
/* This should never be reached */
|
||||
p->completed = 1;
|
||||
|
||||
char mess[MESS_SIZE];
|
||||
snprintf(mess,
|
||||
MESS_SIZE,
|
||||
"Process %ld exited abnormally\n",
|
||||
(long) p->pid);
|
||||
/*
|
||||
If write fails, do nothing. We're in a signal handlers error
|
||||
handler. If things aren't working properly, it's safer to
|
||||
give up.
|
||||
*/
|
||||
write_ignore(2, mess, strlen(mess));
|
||||
fprintf(stderr, "Process %ld exited abnormally\n", (long)p->pid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -399,10 +386,8 @@ void job_mark_process_as_failed(const job_t *job, process_t *p)
|
||||
}
|
||||
|
||||
/**
|
||||
Handle status update for child \c pid. This function is called by
|
||||
the signal handler, so it mustn't use malloc or any such hitech
|
||||
nonsense.
|
||||
|
||||
Handle status update for child \c pid.
|
||||
|
||||
\param pid the pid of the process whose status changes
|
||||
\param status the status as returned by wait
|
||||
*/
|
||||
@@ -411,14 +396,6 @@ static void handle_child_status(pid_t pid, int status)
|
||||
bool found_proc = false;
|
||||
const job_t *j = NULL;
|
||||
process_t *p = NULL;
|
||||
// char mess[MESS_SIZE];
|
||||
/*
|
||||
snprintf( mess,
|
||||
MESS_SIZE,
|
||||
"Process %d\n",
|
||||
(int) pid );
|
||||
write( 2, mess, strlen(mess ));
|
||||
*/
|
||||
|
||||
job_iterator_t jobs;
|
||||
while (! found_proc && (j = jobs.next()))
|
||||
|
||||
Reference in New Issue
Block a user