Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Main
Synchronet
Commits
6d2f94f7
Commit
6d2f94f7
authored
23 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Cleaned up the offline/background execution stuff.
Handles aren't inherited by child if offline or background.
parent
2f4240f9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/xtrn.cpp
+13
-10
13 additions, 10 deletions
src/sbbs3/xtrn.cpp
with
13 additions
and
10 deletions
src/sbbs3/xtrn.cpp
+
13
−
10
View file @
6d2f94f7
...
...
@@ -433,7 +433,7 @@ int sbbs_t::external(char* cmdline, long mode, char* startup_dir)
startup_info
.
dwFlags
|=
STARTF_USESHOWWINDOW
;
}
if
(
native
)
{
if
(
native
&&
!
(
mode
&
EX_OFFLINE
)
)
{
/* temporary */
FILE
*
fp
;
sprintf
(
fname
,
"%sDOOR32.SYS"
,
cfg
.
node_dir
);
...
...
@@ -460,7 +460,7 @@ int sbbs_t::external(char* cmdline, long mode, char* startup_dir)
fullcmdline
,
// pointer to command line string
NULL
,
// process security attributes
NULL
,
// thread security attributes
TRUE
,
// handle inheritance flag
native
&&
!
(
mode
&
EX_OFFLINE
),
// handle inheritance flag
CREATE_NEW_CONSOLE
|
CREATE_SEPARATE_WOW_VDM
,
// creation flags
NULL
,
// pointer to new environment block
p_startup_dir
,
// pointer to current directory name
...
...
@@ -468,7 +468,7 @@ int sbbs_t::external(char* cmdline, long mode, char* startup_dir)
&
process_info
// pointer to PROCESS_INFORMATION
))
{
XTRN_CLEANUP
;
if
(
native
)
if
(
native
&&
!
(
mode
&
EX_OFFLINE
)
)
pthread_mutex_unlock
(
&
input_thread_mutex
);
SetLastError
(
last_error
);
/* Restore LastError */
errormsg
(
WHERE
,
ERR_EXEC
,
realcmdline
,
mode
);
...
...
@@ -712,14 +712,12 @@ int sbbs_t::external(char* cmdline, long mode, char* startup_dir)
}
}
if
(
!
(
mode
&
EX_BG
)
&&
retval
==
STILL_ACTIVE
)
TerminateProcess
(
process_info
.
hProcess
,
GetLastError
());
if
(
!
(
mode
&
EX_BG
))
{
/* !background execution */
XTRN_CLEANUP
;
if
(
retval
==
STILL_ACTIVE
)
TerminateProcess
(
process_info
.
hProcess
,
GetLastError
());
if
(
native
)
pthread_mutex_unlock
(
&
input_thread_mutex
);
else
{
// Get return value
// Get return value
sprintf
(
str
,
"%sDOSXTRN.RET"
,
cfg
.
node_dir
);
FILE
*
fp
=
fopen
(
str
,
"r"
);
if
(
fp
!=
NULL
)
{
...
...
@@ -728,7 +726,12 @@ int sbbs_t::external(char* cmdline, long mode, char* startup_dir)
}
}
if
(
!
(
mode
&
EX_OFFLINE
))
{
XTRN_CLEANUP
;
if
(
!
(
mode
&
EX_OFFLINE
))
{
/* !off-line execution */
if
(
native
)
pthread_mutex_unlock
(
&
input_thread_mutex
);
curatr
=
0
;
// Can't guarantee current attributes
...
...
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