> -----Original Message----- > From: Martin Sebor [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 02, 2006 12:12 AM > To: [email protected] > Subject: Re: [PATCH] RE: testsuite process helpers > > [...] > > + if ('\'' == *cmd || '\"' == *cmd) { > > + char* const cmd1 = cmd + 1; > > + // search the closing quote > > + if (char* pos = strchr (cmd1, *cmd)) { > > Did we decide that it was okay to use this syntax the last > time we discussed it ot or did we say we'd avoid it? (I don't > recall and am too lazy to look it up.) Sorry, I didn't catch what the problem with syntax (I didn't found discussion about _rw_split_cmd() function). Could you be more specific?
> > [...] > > - if (cmd != end) > > - // found, replace to '\0' > > - *cmd++ = '\0'; > > + if (ERROR_INVALID_NAME == err) > > + errno = ENOENT; > > + else > > + errno = _rw_map_errno (err); > > Just curious: why is ERROR_INVALID_NAME not handled in _rw_map_errno? Hmm, I get the map table from the sources of the MSVC crt (function _dosmaperr). I've already added handling of the ERROR_INVALID_NAME to the _rw_map_errno. > [...] > > -#else > > + if (ERROR_INVALID_HANDLE == err) > > + errno = ECHILD; > > + else > > + errno = _rw_map_errno (err); > > Same here. Because ERROR_INVALID_HANDLE by default is mapped to EBADF, but in this case ECHILD should be returned. > > > > [...] > > @@ -337,12 +574,90 @@ > [...] > > +_TEST_EXPORT int > > +rw_process_kill (rw_pid_t pid, int signo) > [...] > > + if (ERROR_INVALID_HANDLE == err) > > + errno = ESRCH; > > + else if (ERROR_ACCESS_DENIED == err) > > + errno = EPERM; > > + else > > + errno = _rw_map_errno (err); > > Same here. And ERROR_ACCESS_DENIED by default is mapped to EACCES, but here EPERM is expected. Farid.
