mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-17 08:01:24 +00:00
initialize the PID and use it
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@39717 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
55b4d1a424
commit
18d31ca7ee
1 changed files with 5 additions and 4 deletions
|
@ -138,6 +138,8 @@ static NSImage *downImage = nil;
|
|||
[viewDelegate setTextView:debuggerView];
|
||||
[viewDelegate setDebugger:self];
|
||||
[viewDelegate release];
|
||||
|
||||
subProcessId = 0;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -221,17 +223,16 @@ static NSImage *downImage = nil;
|
|||
// kill process
|
||||
- (void) interrupt
|
||||
{
|
||||
int pid = [debuggerView subProcessId];
|
||||
if(pid != 0)
|
||||
if(subProcessId != 0)
|
||||
{
|
||||
#ifndef __MINGW32__
|
||||
kill(pid,SIGINT);
|
||||
kill(subProcessId,SIGINT);
|
||||
#else
|
||||
// on windows we run tskill as a shell command
|
||||
NSTask *t;
|
||||
NSArray *args;
|
||||
|
||||
args = [NSArray arrayWithObjects:[NSString stringWithFormat:@"%d", pid], nil];
|
||||
args = [NSArray arrayWithObjects:[NSString stringWithFormat:@"%d", subProcessId], nil];
|
||||
t = [NSTask new];
|
||||
[t setLaunchPath:@"tskill.exe"];
|
||||
[t launch];
|
||||
|
|
Loading…
Reference in a new issue