Does PID change from device to other!!!!


 
Thread Tools Search this Thread
Top Forums Programming Does PID change from device to other!!!!
# 1  
Old 11-29-2012
Does PID change from device to other!!!!

we asked to create a sender and receiver for a signals. sender knows his receiver by it's(receiver) PID .... my question is if i go to other computer and run my program will the pid chages than the first pid i got from old computer?
# 2  
Old 11-29-2012
This is a confusing question.
UNIX:
1. each process has a pid on a given computer and the pid (number) is unique.

2. It is possible but very unlikely to log on to another computer and get a particular pid for your process.

There is a lot more to process id's.

But what you are asking does not appear to make sense. And you cannot raise a signal against a process on a remote computer, in general. (Some kinds of UNIX clusters excluded).

Please clarify what you are doing and what you want to know.
# 3  
Old 11-29-2012
Quote:
Originally Posted by fwrlfo
we asked to create a sender and receiver for a signals. sender knows his receiver by it's(receiver) PID .... my question is if i go to other computer and run my program will the pid chages than the first pid i got from old computer?
I think Jim thought you were confused about the difference between user IDs and process IDs (and you may be), but you also don't seem to understand the concept of a process ID.

When you run a command every utility invoked to run that command will get its own process ID. If you run the same command again, the process IDs of the utilities invoked will be different even if you run then on the same computer. If you want to send a signal to a process you need to know the process ID of the process to which you want to send the signal.

If you start a process in the background using your shell, the shell will give you the process ID of the last process in the pipeline you started. If you start a process in the foreground in a different window, you can use the ps utility to find the process ID of running processes. If you write your own C program to invoke a sender and a receiver, the fork() call that creates a new process will return the process ID of the newly created (receiver) process to the parent and you can then pass that process ID to the sender as an argument when you exec the sender.

If you don't understand the properties of a process, this forum might not be the proper place for you to get started on the very basic underpinnings of the UNIX operating system.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. OS X (Apple)

Change Name of Bluetooth Device from Command Line in macOS

Mac Version 10.15.2 (macOS Catalina) Does anyone know how to change the name of a connected bluetooth device from the command line on macOS? I am having trouble with various bluetooth devices which I cannot get the "rename" option in the GUI to "save" properly and so I cannot rename a few... (0 Replies)
Discussion started by: Neo
0 Replies

2. HP-UX

Failed to open tape device /dev/rmt/0mn:Device busy (errno = 16)

Hi, Unable to make tape backup, please help. /opt/ignite/bin/make_tape_recovery -a /dev/rmt/?mn -I -v -m tar -x inc_entire=vg00 * Creating local directories for configuration files and archive. ======= 04/25/16 16:28:08 IST Started /opt/ignite/bin/make_tape_recovery. (Mon... (4 Replies)
Discussion started by: anuragr
4 Replies

3. AIX

change the primary dump device of a vio server

Hi how to change the primary dump device in a vio server ? $ ioslevel 2.2.0.11-FP-24 SP-01 $ oem_setup_env # sysdumpdev -l primary /dev/sysdumpnull secondary /dev/hd6 copy directory /var/adm/ras forced copy flag TRUE always allow dump TRUE dump... (1 Reply)
Discussion started by: newtoaixos
1 Replies

4. 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

5. UNIX for Dummies Questions & Answers

How to change tape device name.

I disconected external device which was configured as rmt0. When I connect it again and run cfgmgr device name has changed (internal drive which was rmt1 is now rmt0 and external drive was rmt0 and is rmt1) and I dont know how to back it out. The thing is that for all backups I use new modell... (2 Replies)
Discussion started by: fraydey
2 Replies

6. UNIX for Dummies Questions & Answers

NIC and Device NO to Change

I am a beginer in unix . I would like to know what is the command in orser to change NIC and Device NO (1 Reply)
Discussion started by: Ilias Kappatos
1 Replies

7. UNIX for Advanced & Expert Users

%device line change

Hello and thank you in advance for any assistance. Working with SCO 5.0.5 our SCSI tape device is no longer working. Before we replace the unit I want to verify it's not related to a change someone may have made via mkdev tape. For years the boot message would list the tape device as this:... (1 Reply)
Discussion started by: sighbrrguy
1 Replies

8. Red Hat

My device files change!!!!

Hi... this is the situation. I have a server with redhat Advance Server 3 and the operating system is installed in /dev/sda disk... when i include new Luns dinamically they take the following special files /dev/sdb and /dev/sdc.... ok.. until now is everything ok... but the problem begins... (2 Replies)
Discussion started by: lenux78
2 Replies

9. UNIX for Dummies Questions & Answers

Session PID & socket connection pid

1. If I use an software application(which connects to the database in the server) in my local pc, how many PID should be registered? Would there be PID for the session and another PID for socket connection? 2. I noticed (through netstat) that when I logged in using the my software application,... (1 Reply)
Discussion started by: pcx26
1 Replies

10. Programming

printing ppid,child pid,pid

question: for the below program i just printed the value for pid, child pid and parent pid why does it give me 6 values? i assume ppid is 28086 but can't figure out why there are 5 values printed instead of just two! can someone comment on that! #include<stdio.h> #define DIM 8 int... (3 Replies)
Discussion started by: a25khan
3 Replies
Login or Register to Ask a Question