Sponsored Content
Full Discussion: getting processs name
Top Forums UNIX for Advanced & Expert Users getting processs name Post 101412 by vishallbansal on Wednesday 8th of March 2006 04:34:33 AM
Old 03-08-2006
getting processs name

hi,
by getpid() i will get the pid of the current process.
but how do get the name of this process...
or instead from pid how do i get process name...
is there any way...
thanks in advance....
 

2 More Discussions You Might Find Interesting

1. Solaris

understanding the processs

i have a process with the question mark and started on 22 jan.. does this mean it is a zombie process. there are no connecting or child processes... oracle 17546 1 0 Jan 22 ? 0:00 oracleprod2 (LOCAL=NO) please help.. (1 Reply)
Discussion started by: sudhiroracle
1 Replies

2. Solaris

Increase processs priority and affinity in Solaris

I want to know how can in Solaris i can: >Set Process priority to maximum >Set Process Affinity. Linke in windows task manager we can set process priority to following levels: Low, Below Normal,Normal , Above Normal , High , Realtime And we can set process affinity to run on all processors.... (10 Replies)
Discussion started by: mr_os
10 Replies
getpid(2)							System Calls Manual							 getpid(2)

NAME
getpid(), getpgid(), getpgrp(), getpgrp2(), getppid() - get process, process group and parent process ID. SYNOPSIS
DESCRIPTION
These functions return process, process group and parent process IDs, as follows: Process group ID of the specified process. If pid is zero, the call applies to the calling process. Same result as Process group ID of the calling process. Process group ID of the specified process. If pid is zero, the call applies to the calling process. Same result as Process ID of the calling process. Parent process ID of the calling process. If the parent process is the initialization process (known as the call returns 1. Security Restrictions The system call is subject to compartmental restrictions. See compartments(5) for more information about compartmentalization on systems that support that feature. Compartmental restrictions can be overridden if the process possesses the privilege (PRIV_COMMALLOWED). Processes owned by the superuser may not have this privilege. Processes owned by any user may have this privilege, depending on system configuration. See privileges(5) for more information about privileged access on systems that support fine-grained privileges. RETURN VALUE
The functions return the following values: Successful completion. n is a nonnegative process ID, as described above. Failure: and only. is set to indicate the error. ERRORS
If or fails, is set to one of the following values: [EPERM] The current process and pid are not in the same session (see setsid(2)). [ESRCH] No process can be found corresponding to that specified by pid. AUTHOR
and were developed by HP, AT&T, and the University of California, Berkeley. SEE ALSO
exec(2), fork(2), setpgid(2), setsid(2), signal(5). STANDARDS CONFORMANCE
getpid(2)
All times are GMT -4. The time now is 02:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy