Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
c9b6494a
Commit
c9b6494a
authored
Aug 02, 2000
by
Zack Weinberg
Committed by
Zack Weinberg
Aug 02, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* pexecute.c: Don't use vfork. Initialize 'pid' before retry loop.
From-SVN: r35436
parent
f536cd95
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
20 deletions
+9
-20
libiberty/ChangeLog
+4
-0
libiberty/pexecute.c
+5
-20
No files found.
libiberty/ChangeLog
View file @
c9b6494a
2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
* pexecute.c: Don't use vfork. Initialize 'pid' before retry loop.
2000-07-26 Dave Pitts <dpitts@cozx.com>
* config/mh-openedition.h: Added -DLE370 definition.
...
...
libiberty/pexecute.c
View file @
c9b6494a
...
...
@@ -46,19 +46,6 @@ extern int errno;
#include <sys/wait.h>
#endif
#ifdef vfork
/* Autoconf may define this to fork for us. */
# define VFORK_STRING "fork"
#else
# define VFORK_STRING "vfork"
#endif
#ifdef HAVE_VFORK_H
#include <vfork.h>
#endif
#ifdef VMS
#define vfork() (decc$$alloc_vfork_blocks() >= 0 ? \
lib$get_current_invo_context(decc$$get_vfork_jmpbuf()) : -1)
#endif
/* VMS */
#include "libiberty.h"
/* stdin file number. */
...
...
@@ -714,9 +701,10 @@ pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
/* Fork a subprocess; wait and retry if it fails. */
sleep_interval
=
1
;
pid
=
-
1
;
for
(
retries
=
0
;
retries
<
4
;
retries
++
)
{
pid
=
v
fork
();
pid
=
fork
();
if
(
pid
>=
0
)
break
;
sleep
(
sleep_interval
);
...
...
@@ -726,11 +714,9 @@ pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
switch
(
pid
)
{
case
-
1
:
{
*
errmsg_fmt
=
VFORK_STRING
;
*
errmsg_arg
=
NULL
;
return
-
1
;
}
*
errmsg_fmt
=
"fork"
;
*
errmsg_arg
=
NULL
;
return
-
1
;
case
0
:
/* child */
/* Move the input and output pipes into place, if necessary. */
...
...
@@ -754,7 +740,6 @@ pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
/* Exec the program. */
(
*
func
)
(
program
,
argv
);
/* Note: Calling fprintf and exit here doesn't seem right for vfork. */
fprintf
(
stderr
,
"%s: "
,
this_pname
);
fprintf
(
stderr
,
install_error_msg
,
program
);
fprintf
(
stderr
,
": %s
\n
"
,
xstrerror
(
errno
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment