Hi,

Dev Mazumdar wrote:
If you've ever used ddi_get_pid() to return the process's PID, you'll find the 
function below rather handy:

char *
ddi_get_proc_name (void)     /* Return the command name of the current thread */
{
  return ttoproc (curthread)->p_user.u_comm;
}

This function will return the name of the process (or program) that 
ddi_get_pid() will return.

If you've ever user mixertool while running an audio app, you can only see the PID of the process. Using our little kernel function, you can also get the name of the process that was currently playing.
We use it in our Open Sound drivers to show what process (and it's PID) is 
currently accessing the particular OSS device.

We'd like to request a formal inclusion of this function into Open Solaris.

I'd recommend filing an RFE requesting this feature be included. You can do this here:

https://www.opensolaris.org/bug/report.jspa

If others feel this is a good function to have (looks reasonable to me) I'll be happy to work with you as a sponsor to get this integrated.

Cheers,
- Eric
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to