Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
KWSys
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Artur Ryt
KWSys
Commits
c65dfa03
Commit
c65dfa03
authored
19 years ago
by
Brad King
Browse files
Options
Downloads
Patches
Plain Diff
BUG: Do not close stdout/stderr pipes in parent if they are shared.
parent
c8eef02b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ProcessUNIX.c
+8
-2
8 additions, 2 deletions
ProcessUNIX.c
ProcessWin32.c
+5
-2
5 additions, 2 deletions
ProcessWin32.c
with
13 additions
and
4 deletions
ProcessUNIX.c
+
8
−
2
View file @
c65dfa03
...
...
@@ -689,7 +689,10 @@ void kwsysProcess_Execute(kwsysProcess* cp)
}
/* The parent process does not need the output pipe write ends. */
kwsysProcessCleanupDescriptor
(
&
si
.
StdErr
);
if
(
si
.
StdErr
!=
2
)
{
kwsysProcessCleanupDescriptor
(
&
si
.
StdErr
);
}
kwsysProcessCleanupDescriptor
(
&
si
.
TermPipe
);
/* Restore the working directory. */
...
...
@@ -1395,7 +1398,10 @@ static int kwsysProcessCreate(kwsysProcess* cp, int prIndex,
}
/* The parent process does not need the output pipe write ends. */
kwsysProcessCleanupDescriptor
(
&
si
->
StdOut
);
if
(
si
->
StdOut
!=
1
)
{
kwsysProcessCleanupDescriptor
(
&
si
->
StdOut
);
}
return
1
;
}
...
...
This diff is collapsed.
Click to expand it.
ProcessWin32.c
+
5
−
2
View file @
c65dfa03
...
...
@@ -1160,7 +1160,7 @@ void kwsysProcess_Execute(kwsysProcess* cp)
{
kwsysProcessCleanupHandle
(
&
si
.
StartupInfo
.
hStdOutput
);
}
if
(
si
.
StartupInfo
.
hStd
Output
!=
GetStdHandle
(
STD_ERROR_HANDLE
))
if
(
si
.
StartupInfo
.
hStd
Error
!=
GetStdHandle
(
STD_ERROR_HANDLE
))
{
kwsysProcessCleanupHandle
(
&
si
.
StartupInfo
.
hStdError
);
}
...
...
@@ -1176,7 +1176,10 @@ void kwsysProcess_Execute(kwsysProcess* cp)
/* Close the inherited handles to the stderr pipe shared by all
processes in the pipeline. */
kwsysProcessCleanupHandle
(
&
si
.
StartupInfo
.
hStdError
);
if
(
si
.
StartupInfo
.
hStdError
!=
GetStdHandle
(
STD_ERROR_HANDLE
))
{
kwsysProcessCleanupHandle
(
&
si
.
StartupInfo
.
hStdError
);
}
/* Restore the working directory. */
if
(
cp
->
RealWorkingDirectory
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment