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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitted by:  Sheldon Gill <sheldon>
Submitted on:  Mon 18 Sep 2006 05:13:31 AM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

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>
Project 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>
Project 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>

 

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
  • -unavailable- added by CaS (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 20 Feb 2008 03:25:59 PM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Mon 18 Sep 2006 05:13:32 AM UTCsheldonAttached File-=>Added tasklaunch.m, #10788

    Back to the top


    Powered by Savane 3.1-cleanup1