Sponsored Content
Top Forums Programming how to get the process data structure through pid? Post 302278068 by steephen on Monday 19th of January 2009 07:52:01 AM
Old 01-19-2009
Could you please go through the function 'sigqueue'. Is it that you are looking for ?
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Obtaining A Process ID (PID)

Is there any way I can get UNIX to return the Process ID of a process when I actually issue the command to invoke the process? For example, if I was to launch an emacs process in batch mode, by issuing the UNIX command : % emacs file.txt& then UNIX would return the Process ID (PID).... (7 Replies)
Discussion started by: 1cuervo
7 Replies

2. Shell Programming and Scripting

Process PID

Hi Friends :p I have a little problem please help me out. I have a Unix based OS Sun Server having oracle 8i as database on it. The server has one client with windows OS. The client uses developer 2000 (GUI) to run query and run processes. I want to know how can I know the PID of a process run... (3 Replies)
Discussion started by: vanand420
3 Replies

3. Programming

How to read task_struct process structure of Linux

Hi, I want to read the task_struct structure in Linux in order to get the names & pids of all processes. How can this be done?? Thanks in adv, molu (4 Replies)
Discussion started by: molu
4 Replies

4. Solaris

getting pid of process

hi all, Is there a simple script anyone could through out to me, to find the pid of a process given the name. I actually need to bind this pid to a processor set. I would probably put these comamns in a shell script which would have. a) kick start the executable b) get the pid c) bind it to a... (10 Replies)
Discussion started by: Naanu
10 Replies

5. UNIX for Dummies Questions & Answers

Need to get pid of a process and have to store the pid in a variable

Hi, I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this. Thanks in advance, Amudha (7 Replies)
Discussion started by: samudha
7 Replies

6. Shell Programming and Scripting

Get an PID of particular process

Hi I have written a shell script to find and kill the particular process. Here in shell script i have written the code like cnt = $(ps -ef | grep Shree) echo $cnt I am getting the output root 2326 2317 0 14:39:46 pts/1 0:28 Shree -f fdc.fbconf FDCapp.fbapp Here I want to... (2 Replies)
Discussion started by: Shreedhar Naik
2 Replies

7. Shell Programming and Scripting

getting pid from a process

Hi all, i was able to redirect pid of process to a file in the following way ps aux|awk '$11 == "/Applications/ProjectX/DServer" >> /Applications/ProjectX/DServer.pid it works fine but if one folder name caontains space its not working like below ps aux|awk '$11 == "/Applications/Project\... (1 Reply)
Discussion started by: kirankumars
1 Replies

8. Programming

[C] Process pid by name

Hi I use linux OS. I've already written a function that allow me to get the process name by pid. (searching in /proc). Now I'd like to perform the inverse task.I mean get the process pid by its name. I could write a function that search in every folder in /proc for the process name, but i... (2 Replies)
Discussion started by: Dedalus
2 Replies

9. HP-UX

PID Process Resources

Hi all. I need to get detailed information about a PID. I have an app called Reflection X and it shows many things like Total CPU percent, User CPU (Nice) percent, FS Reads, etc. My question is how can I get all that information on console? Is there an archive with the detailed... (9 Replies)
Discussion started by: the0m3n
9 Replies

10. AIX

How to get process name from PID?

HI, i used ps -ef | grep 3539052 | grep -v grep and i got a output like ths root 3539052 3407918 0 May 07 - 709:31 /usr/sbin/syslogd but what i need is instead of full path /usr/sbin/syslogd i want only the process name that is 'syslogd' here. (3 Replies)
Discussion started by: sumanthupar
3 Replies
SCHED_SETSCHEDULER(2)					      BSD System Calls Manual					     SCHED_SETSCHEDULER(2)

NAME
sched_setscheduler, sched_getscheduler -- set/get scheduling policy and scheduler parameters LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sched.h> int sched_setscheduler(pid_t pid, int policy, const struct sched_param *param); int sched_getscheduler(pid_t pid); DESCRIPTION
The sched_setscheduler() system call sets the scheduling policy and scheduling parameters of the process specified by pid to policy and the parameters specified in the sched_param structure pointed to by param, respectively. The value of the sched_priority member in the param structure must be any integer within the inclusive priority range for the scheduling policy specified by policy. In this implementation, if the value of pid is negative the system call will fail. If a process specified by pid exists and if the calling process has permission, the scheduling policy and scheduling parameters will be set for the process whose process ID is equal to pid. If pid is zero, the scheduling policy and scheduling parameters are set for the calling process. In this implementation, the policy of when a process can affect the scheduling parameters of another process is specified in IEEE Std 1003.1b-1993 (``POSIX.1'') as a write-style operation. The scheduling policies are in <sched.h>: [SCHED_FIFO] First-in-first-out fixed priority scheduling with no round robin scheduling; [SCHED_OTHER] The standard time sharing scheduler; [SCHED_RR] Round-robin scheduling across same priority processes. The sched_param structure is defined in <sched.h>: struct sched_param { int sched_priority; /* scheduling priority */ }; The sched_getscheduler() system call returns the scheduling policy of the process specified by pid. If a process specified by pid exists and if the calling process has permission, the scheduling parameters for the process whose process ID is equal to pid are returned. In this implementation, the policy of when a process can obtain the scheduling parameters of another process are detailed in IEEE Std 1003.1b-1993 (``POSIX.1'') as a read-style operation. If pid is zero, the scheduling parameters for the calling process will be returned. In this implementation, the sched_getscheduler system call will fail if pid is negative. RETURN VALUES
Upon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error. ERRORS
On failure errno will be set to the corresponding value: [ENOSYS] The system is not configured to support this functionality. [EPERM] The requesting process doesn not have permission as detailed in IEEE Std 1003.1b-1993 (``POSIX.1''). [ESRCH] No process can be found corresponding to that specified by pid. [EINVAL] The value of the policy argument is invalid, or one or more of the parameters contained in param is outside the valid range for the specified scheduling policy. SEE ALSO
sched_get_priority_max(2), sched_get_priority_min(2), sched_getparam(2), sched_rr_get_interval(2), sched_setparam(2), sched_yield(2) STANDARDS
The sched_setscheduler() and sched_getscheduler() system calls conform to IEEE Std 1003.1b-1993 (``POSIX.1''). BSD
March 12, 1998 BSD
All times are GMT -4. The time now is 07:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy