Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Wierd problem with functions on Solaris 2.4



In message <199604101312.JAA00473@xxxxxxxxxxxxxxxxx>, elessar writes:
>I'm not quite certain what happened, so I'm referring this question here to
>see if anyone might know the reason for this strange occurance.
>
>I am using zsh 2.6beta13 on Solaris 2.4, on a Sparc IPC.
>	
>I handed zsh the following function:
>
>list() { ps -aux | grep $1 | grep -v grep ; }
>
>and when I attempted to run it, my drive started getting accessed like crazy
>and I was unable to get the machine to respond to any keystrokes or mouse
>clicks, even though I was able to move the pointer around (was in OpenWindows)
>.
>An attempt to login remotely from another machine met with no success, for
>I never received a login prompt.
>
>I am uncertain if this is a problem with zsh, Solaris 2.4, or the function
>itself.  Someone else who looked at the function said it _should_ work, but
>of course it didn't.  So I'm wondering if anyone here has a clue, and may be
>able to explain the problem to me.
>

Well, for a data point, I got the expected response:
  % list() { ps -aux | grep $1 | grep -v grep ; }
  % list zsh
  ps: unknown user x
  % # but then again, my path probably isn't like yours
  % list() { /usr/ucb/ps -aux | grep $1 | grep -v grep ; }
  % list zsh
  # process listing of zsh processes here, and it skips the "grep zsh" proc
  % list
  Usage: grep -hblcnsviw pattern file . . .
  % uname -srm
  SunOS 5.5 sun4u
  % echo $VERSION
  zsh 2.5.03

The function and the greps look normal enough, as long as your shell built 
correctly (and that beta is well behaved).  I'm also hesitant to fault Sol
2.4's ucb/ps, even with my limited experience with it.  Try a non-beta zsh
and see how that works.

--
Paul




Messages sorted by: Reverse Date, Date, Thread, Author