bugGNUstep - Bugs: bug #29525, NSTask problem on windows

Group
 
 

bug #29525: NSTask problem on windows

Submitter:  Riccardo Mottola <rmottola>
Submitted:  Mon 12 Apr 2010 11:09:32 AM UTC
   
 
Category:  Base/Foundation Severity:  4 - Important
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 18 Apr 2010 04:36:12 PM UTC, comment #4: 

As far as I can tell things are working OK.

Richard Frith-Macdonald <CaS>
Group Member
Mon 12 Apr 2010 01:13:37 PM UTC, comment #3: 

I think the microsoft documentation is misleading (ie our setting up of the command line argument to create a process is OK).

Certainly the existing code seems to work ... if you launch a task with a few arguments, and that task prints its arguments, the output matches the values set.

Most likely Riccardo's 'Parametro non corretto' refers to the path (MEM.EXE) being an invalid parameter to the CreateProcessW() function, rather than to an error in the command line we are using.

Richard Frith-Macdonald <CaS>
Group Member
Mon 12 Apr 2010 12:06:53 PM UTC, comment #2: 

I think this is a faulty test ... I've changed it to run programs we created instead of mem.exe
I think the issue is that mem.exe is an old 16bit DOS program, and NSTask would need to refrain from setting the CREATE_NO_WINDOW flag (because 16 bit programs need a window to be created for them).
The problem is, if we create a window then it can get unpredictably displayed (we've had bug reports about that in the past) for unknown (to me at least) reasons .... messing up the display.  Probably not supporting 16bit apps is the lesser of two evils, the current code is correct, and the test was wrong.

Richard Frith-Macdonald <CaS>
Group Member
Mon 12 Apr 2010 12:02:43 PM UTC, comment #1: 

I think this is caused by us adding the program name to the arguments string. According to the specification http://msdn.microsoft.com/en-us/library/ms682425%28VS.85%29.aspx it sounds like we either have to leave out the application name parameter or provide only the arguments as the command line.

But then the documentation isn't that clear and I don#t have a Windows system to test this on at the moment.

Fred Kiefer <FredKiefer>
Group Member
Mon 12 Apr 2010 11:09:32 AM UTC, original submission:  

there are problems with the arguments passed.

using the launch test in the base/NSTask suite:

Running base/NSTask/launch.m...
This is gnustep-make 2.2.0. Type 'make print-gnustep-make-help' for help.
2010-04-12 13:01:51.135 launch[1740] Error launching task: C:\WINDOWS\SYSTEM32\MEM.EXE ... Parametro non corretto.

(the error message means invalid parameter)

a simple test with execve() is able to start mem.exe directly.
Maybe it is a NSTask problem with the parameter array or a problem of CreateProcessW compared to execve?

Riccardo Mottola <rmottola>
Group Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

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)
  • -email is unavailable- added by FredKiefer (Posted a comment)
  • -email is unavailable- added by rmottola (Submitted the item)
  •  

    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
    2010-04-18 CaS StatusNone Fixed
        Open/ClosedOpen Closed
    2010-04-12 rmottola Severity3 - Normal 4 - Important

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code