Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
6b76ca09
...
6b76ca09ca0964440800cd2614ff95f3d250826c
authored
2005-03-06 23:12:06 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(mu_spawnvp): Minor fixes
1 parent
986fc6f1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
mailbox/mutil.c
mailbox/mutil.c
View file @
6b76ca0
...
...
@@ -613,7 +613,7 @@ mu_tempname (const char *tmpdir)
* to find it.
*/
int
mu_spawnvp
(
const
char
*
prog
,
const
char
*
const
av_
[],
int
*
stat
)
mu_spawnvp
(
const
char
*
prog
,
const
char
*
const
av_
[],
int
*
stat
)
{
pid_t
pid
;
int
err
=
0
;
...
...
@@ -623,7 +623,7 @@ mu_spawnvp (const char* prog, const char* const av_[], int* stat)
struct
sigaction
savequit
;
sigset_t
chldmask
;
sigset_t
savemask
;
char
**
av
=
(
char
**
)
av_
;
char
**
av
=
(
char
**
)
av_
;
if
(
!
prog
||
!
av
)
return
EINVAL
;
...
...
@@ -635,13 +635,20 @@ mu_spawnvp (const char* prog, const char* const av_[], int* stat)
if
(
sigaction
(
SIGINT
,
&
ignore
,
&
saveintr
)
<
0
)
return
errno
;
if
(
sigaction
(
SIGQUIT
,
&
ignore
,
&
savequit
)
<
0
)
{
sigaction
(
SIGINT
,
&
saveintr
,
NULL
);
return
errno
;
}
sigemptyset
(
&
chldmask
);
/* now block SIGCHLD */
sigaddset
(
&
chldmask
,
SIGCHLD
);
if
(
sigprocmask
(
SIG_BLOCK
,
&
chldmask
,
&
savemask
)
<
0
)
{
sigaction
(
SIGINT
,
&
saveintr
,
NULL
);
sigaction
(
SIGQUIT
,
&
savequit
,
NULL
);
return
errno
;
}
#ifdef HAVE_VFORK
pid
=
vfork
();
...
...
@@ -675,7 +682,7 @@ mu_spawnvp (const char* prog, const char* const av_[], int* stat)
err
=
errno
;
/* error other than EINTR from waitpid() */
break
;
}
if
(
err
==
0
&&
stat
)
if
(
err
==
0
&&
stat
)
*
stat
=
progstat
;
}
...
...
Please
register
or
sign in
to post a comment