Re: posix ps (was Re: Adding `pgrep' and `pkill' to /usr/bin)

From: Albert Cahalan (albert_at_users.sf.net)
Date: 03/27/04

  • Next message: Garance A Drosihn: "Re: posix ps (was Re: Adding `pgrep' and `pkill' to /usr/bin)"
    To: Harti Brandt <brandt@fokus.fraunhofer.de>
    Date: 27 Mar 2004 11:59:00 -0500
    
    

    On Sat, 2004-03-27 at 09:46, Harti Brandt wrote:
    > On Fri, 26 Mar 2004, Albert Cahalan wrote:
    >
    > AC>Cyrille Lefevre writes:
    > AC>
    > AC>Step 1:
    > AC>
    > AC>a. ps does old BSD behavior by default
    > AC>b. /posix/bin/ps is a script that sets the SUSv3 personality
    > AC>c. /usr/ucb/ps is a link to /bin/ps
    > AC>
    > AC>Step 2:
    > AC>
    > AC>a. ps does SUSv3 by default
    > AC>b. /posix/bin/ps is a link to /bin/ps
    > AC>c. /usr/ucb/ps is a script that sets the old BSD personality
    >
    > It don't think that 2a is a good step. Too many people are used to BSD
    > behaviour especially if the are on a BSD system. Also it seems to me that
    > having /usr/ucb on a BSD system is a silly thing. If you need /usr/posix
    > (not /posix please) so it be.

    I suppose you can be outcasts forever, causing cross-platform
    sysadmins headaches until the world ends. (in 2038, naturally)

    I forgot to mention an intermediate step that was used
    when the Linux world made this very same transition.
    The ps command had only BSD-like behavior, but warned
    if a "-" was used. People griped about it for a bit
    while adjusting their habits and scripts. Then, when
    the cut-over happened, very few things broke.

    Another trick that helped with the transition was to have
    ps restart the command parser in BSD mode if the options
    didn't make sense in UNIX mode. So "ps -axu" would trigger
    this, issue the warning, and then go on to produce the
    expected output. (you could re-exec to handle this if you
    don't want to reset all the parser state)

    So, I've been there. Things worked out great.

    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"


  • Next message: Garance A Drosihn: "Re: posix ps (was Re: Adding `pgrep' and `pkill' to /usr/bin)"