bugGNUstep - Bugs: bug #17788, Hang waiting for task completion...

Group
 
 

bug #17788: Hang waiting for task completion on MS-Windows

Submitter:  Sheldon Gill <sheldon>
Submitted:  Mon 18 Sep 2006 05:13:31 AM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 20 Feb 2008 03:25:59 PM UTC, comment #4: 

Marking this as closed... no more reports of windows popping up even without the DETACHED_PROCESS flag.

Richard Frith-Macdonald <CaS>
Group Member
Tue 19 Sep 2006 12:56:42 AM UTC, comment #3: 

Well, the DETACHED_PROCESS is partly to blame. IMHO its not the right solution to the issue of console windows being popped up.

That aside, looking more closely it seems to have much to do with the way that CreateProcessW is being called. The WinAPI has many... interesting quirks.

The start_info block is being set up with the handles and I'm not certain what the problem is there yet...

Sheldon Gill <sheldon>
Mon 18 Sep 2006 10:55:16 AM UTC, comment #2: 

This is probably due to the DETACHED_PROCESS flag which was added to the CreateProcessW() call in order to prevent the bug of  console windows being popped up unexpectedly by subprocesses.
The start_info block should be setting up stdin, stdout, and stderr ... so it's not obvious why a program should require a console.  Maybe the problem is with NSFileHandle?  If so, possibly rewriting NSFileHandle for windows by using NSStream would be the beast solution.

Richard Frith-Macdonald <CaS>
Group Member
Mon 18 Sep 2006 07:55:20 AM UTC, comment #1: 

Actually, the bug is more than just the hang.

Output of the called task doesn't appear at all.
On unix, if you invoke "/bin/ls" you'll see the directory listing at the appropriate time.
On windows current implementation, you see nothing.

Also, on unix you can invoke "ls" and it'll work fine.
On windows current implementation it can't find "ls".


Sheldon Gill <sheldon>
Mon 18 Sep 2006 05:13:31 AM UTC, original submission:  

There is a bug in NSTask when running on MS-Windows.

Attached is a simple tool which demonstrates the bug.
If you run it under MSYS it will work.
If you run it under CMD it will fail, simply hanging forever.


I believe this is being caused by console issues (ie second task doesn't have the right console environment for it) but haven't delved into exactly why.

Sheldon Gill <sheldon>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #10788:  tasklaunch.m added by sheldon (1KiB - text/plain - NSTask bug on ms-windows)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by CaS (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-02-20 CaS StatusNone Fixed
        Open/ClosedOpen Closed
    2006-09-18 sheldon Attached File- Added tasklaunch.m, #10788

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code