-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
How to implement System.Diagnostics.Process on FreeBSD? #14725
Comments
Thanks for the info, but please be careful linking to such code... to my knowledge, code in that area of Mono is under a license not compatible with MIT. |
@stephentoub that statement isn't correct. the MIT license is liberal enough that combined work of LGPLed code and MIT code effectively becomes LGPL. |
What I meant is that is that this corefx codebase is covered by the MIT license; you couldn't take code from areas of the Mono codebase covered by LGPL and just commit it to corefx. |
Technically you can, but the .NET Foundation will probably object such contribution, yes :) |
Which means you can't 😉 It will not be merged. |
I wrote this code, you can treat it as public domain, it is no different from the manual page examples. I hope it helps :) |
Tip-off from jasonwilliams200OK:
https://github.com/nodejs/io.js/blob/master/deps/uv/src/unix/freebsd.c (MIT) |
@sokket, is |
Sorry for the late response, I was on vacation the last few days... @jasonwilliams200OK Yup, my goal is to get all the native calls shim'd, |
@sokket, welcome back! :D
For the rest of the congress of assemblies, which are successfully building, we are unable to test due to dotnet/buildtools#300 (and maybe other unknown factors too: https://github.com/dotnet/coreclr/issues/1633#issuecomment-143669303). |
I did an initial investigation into FileSystemWatcher and wrote about it in #14716, but the tldr; is that the FreeBSD version would work very differently from the OSX and Linux implementations today. We have some options for how to mitigate that written up in the bug. I'm currently working on shim'ing the ProcessInfo and ThreadInfo native calls over, but it looks like FreeBSD does not have the OSX system calls or ProcFS like on Linux. My refactor should make it simple for new platforms (such as FreeBSD 😄) to be brought up and working, as long as someone knows the correct native calls for that platform. If anyone on this thread knows the correct calls for retrieving process information, shoot me an email and (if they're trivial to add) I can add them to the PAL layer with my current pack |
I have written the Mono implementation in mono/mono#1864. Feel free to use that (I have added a comment to dedicate this to public domain). Actually you should be able to use a (superior in my opinion) Mono currently does not even require |
I had to roll back some of the refactoring changes so I won't be able to get this into my current pack, unfortunately :( |
With the task of moving to shims done, should this issue too be closed? |
Closing this issue, given that mono implementations can be used now, and also shim work is done. Please open new issue with current data on Freebsd support if required. |
This issue is to discuss how we can implement
System.Diagnostics.Process
on FreeBSD which does not have procfs by enabled by default as it should be considered deprecated.Reference Material
Implement basic System.Diagnostics.Process.Modules support on Linux dotnet/corefx#2188
The System.Diagnostics.Process specification on MSDN.
The FreeBSD process information implementation within Mono (LGPL)
The FreeBSD process information implementation within IO.JS (MIT)
https://www.freebsd.org/cgi/man.cgi?procstat and https://www.freebsd.org/cgi/man.cgi?sysctl(3)
/cc: @janhenke @saper @jasonwilliams200OK @josteink
The text was updated successfully, but these errors were encountered: