"Launch" vs "shell" vs "open process" against close and kill

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Havanna
Posts: 53
Joined: Wed May 14, 2014 3:00 pm

"Launch" vs "shell" vs "open process" against close and kill

Post by Havanna »

For unpleasant reasons I tried to make a wrapper that does no more but "on opencard" launch a windows (32 bit) program.
I has a button to kill/close/shutdown that same program.

Now I can get this program to run only with get shell("winprog.exe"), launch or open process just don't do anything (they work though with different windows executables).
Same for termination: close or kill won't finish up my winprog, but they work for other executables.

Anyone got a clue?
WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm

Re: "Launch" vs "shell" vs "open process" against close and

Post by WaltBrown »

One idea: check out "taskkill -?" from the Win command line.
Walt Brown
Omnis traductor traditor
Havanna
Posts: 53
Joined: Wed May 14, 2014 3:00 pm

Re: "Launch" vs "shell" vs "open process" against close and

Post by Havanna »

Thx, Waltbrown.
Taskkill indeed shuts it down, with /f /t (forcibly and with child processes), no traces left, no process kept running, no filelocks whatsoever.
Now I get a fresh stumbler: The whole runs dirctly from cdrom, all fine that far. But after taskkill Windows refuses to open the cd tray. No way but OS Restart or brute force! :cry:
WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm

Re: "Launch" vs "shell" vs "open process" against close and

Post by WaltBrown »

Can you look at and kill the child processes selectively?
Walt Brown
Omnis traductor traditor
Havanna
Posts: 53
Joined: Wed May 14, 2014 3:00 pm

Re: "Launch" vs "shell" vs "open process" against close and

Post by Havanna »

WaltBrown wrote:Can you look at and kill the child processes selectively?
Yes (procexp), but that makes no difference.
I've also copied the whole stuff to a HD directory and started from there. After killing the application I deleted that whole directory, hoping to get a lock error - no beef. Very unhappy.
mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3582
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: "Launch" vs "shell" vs "open process" against close and

Post by mwieder »

Hmmm... it's been a while since I've had to deal with Windows, but it sounds a bit like the parent process that launched the executable might still be running, and so that would be preventing unmounting the drive it's running from.

Does your shell command return an error?
Post Reply