Date: Wed, 24 Mar 2004 20:20:09 -0500 From: Garance A Drosihn <drosih@rpi.edu> To: Albert Cahalan <albert@users.sourceforge.net>, freebsd-standards@freebsd.org Subject: Re: PATCH for a more-POSIX `ps', and related adventures Message-ID: <p06020474bc87e2394247@[128.113.24.47]> In-Reply-To: <p0602046ebc87c97b75b3@[128.113.24.47]> References: <1080165171.2232.910.camel@cube> <p0602046ebc87c97b75b3@[128.113.24.47]>
next in thread | previous in thread | raw e-mail | index | archive | help
At 7:43 PM -0500 3/24/04, Garance A Drosihn wrote: >At 4:52 PM -0500 3/24/04, Albert Cahalan wrote: > >> > I am not thrilled with that idea, but at the moment I can't >> > think of a better one. I *would* like to support matches of >> > both real and effective users. I guess we could add some >> > other option which would say "use the POSIX definitions of >> > -u and -U", but that doesn't exactly thrill me either. >> >>Why not? Tru64 uses the CMD_ENV environment variable to >>handle this. Linux does too, with PS_PERSONALITY taking >>priority. So, on either OS, you can do: > >I don't like keying a command's option-parsing behavior off of >environment variables. I can be talked into it if it would be >following some precedent in other OS's, but my initial-reaction >to this tactic (for any command) is to avoid it. Please note that >this isn't some multi-month project that I've been working on, I >have been looking at this for less than a week, and very little >of that week. I just thought I'd do some of the "easy stuff" >that would get our `ps' a little closer to SUSv3. > >So, given a little time you might be able talk me into using >environment vars to clean this up, but at the moment: ENOTIME... I should mention that I have been thinking of MAYBE creating some new command, say `psx', which would be much more SUSv3 compatible. It would be the same source code as `ps', and the behavior would key off of the name of the executable. Actually, maybe two new commands, `psbsd' and `psx'. In 5.x-stable we would have `ps' be exactly the same as `psbsd', and in 6.x-current we could have `ps' be exactly the same as `psx'. That way, scripts which HAD to work on both systems could pick the executable that they wanted. I haven't discussed that with anyone else yet, though. It's just something that came to mind when I was thinking about all these conflicting-options over the weekend. For all I know, everyone here would hate the idea... Give me another week to think about it, and I might even hate the idea! -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p06020474bc87e2394247>