Talk:Execute a system command

From Rosetta Code

Shell command vs arguments array

I propose that we extend this task to include explicitly executing

  1. a "shell command", i.e. a string passed to an interpreter such as /bin/sh which parses it
  2. the command directly, i.e. specifying an array of arguments

(As applicable to the platform, of course; I'm thinking of this from a POSIX perspective.) The reason is that a common source of bugs is to use a "shell command" interface and fail to quote arguments which may have spaces in them, when the simple and reliable solution is to execute the command directly (POSIX exec(2)). It would therefore be good to promote awareness of the difference and knowledge of how to do either one as desired.

If there is agreement, I will revise the task to discuss this. --Kevin Reid 18:00, 6 August 2009 (UTC)

Visual Basic - does it suck as much as this implies?

Okay, leaving aside the inflammatory title (yeah, I hate VB, let's move on). With the example code, waiting for a process is done by spinning; would it be possible instead to use WaitForSingleObject or MsgWaitForMultipleObjects[Ex]? If I were doing it in C++, I would use something like that.

I'm not an expert VB programmer, so is someone else interested in picking up the idea and moving with it?

Rosuav 12:26, 11 January 2010 (UTC)