-
-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
%pgrep("java") results in mysterious #541
Comments
|
Huh seems to work for me lihaoyi ~$ amm
Loading...
Welcome to the Ammonite Repl 0.8.1
(Scala 2.12.1 Java 1.8.0_112)
@ import ammonite.ops._, ImplicitWd._
import ammonite.ops._, ImplicitWd._
@ %pgrep("java")
18355
43275
45012
45049
45050This is on OSX No idea why it's blowing up on your machine |
|
I was on FreeBSD; I'll test a bit more on it and Linux and see what I find. |
|
So far, I can confirm that this works on all my tests on Linux: Oracle JDK or openjdk 8. I have tested on two different freebsd systems and both have the same issue (both using openjdk 8). So it seems to be FreeBSD specific. Any other FreeBSD 11 + amm (or at least FreeBSD + Scala) users that might be worth talking to? |
|
I seem to have confirmed that it is something to do with being self-referential: bash: amm: |
|
Seems like more of a FreeBSD problem than an Ammonite problem in that case; can you reproduce via Closing this to keep it out of the queue, but feel free to continue the discussion: I'll reopen if there's clearly work to do on the Ammonite side |
|
Looks like I lied - I was using tcsh, but it isn't an issue there: Cross-reference to FreeBSD bug report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215781 |
|
As was pointed out be @jillest in the FreeBSD bug report, it is indeed not a bug, as the FreeBSD pgrep does not show ancestors by default (though it does with '-a'): To make things more fun, on Linux, |
|
Aside: I thought OS X was closer to BSD, but I guess that is kernel space only perhaps. |
When trying to run pgrep on java in
ammshell, I get the following result (but note that running it ontopworks):In this case, the java process in question is the
ammprocess, so I wonder if this has something to do withammtrying to access itself in a way that isn't allowed? Runningpgrepfrom another shell works.I tried to look at "ex.result", taking a clue from #489, but I don't see
resultas a member of the exception object:A bit of inspection results in the following:
My original query was on SO.
The text was updated successfully, but these errors were encountered: