Sponsored Content
Top Forums UNIX for Advanced & Expert Users Copy files without affecting the running process Post 302886771 by Corona688 on Monday 3rd of February 2014 01:21:46 PM
Old 02-03-2014
Quote:
Originally Posted by ThobiasVakayil
Hi Experts,

I would like to know in Linux any command which will replace a file without affecting the running process.
Files do not work that way... If they "affect the running process", they do so because the process is reading them. If they are reading them, how could they not be effected?

So your question is vague and doesn't make a lot of sense to me on the face of it. Could you explain your actual goal please?
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to create a dummy process of a process already running?

Hi Everybody, I want to create a shell script named as say "jip" and it is runned. And i want that when i do ps + grep for the process than this jip should be shown as process. Infact there might be process with name jip which is already running. (3 Replies)
Discussion started by: shambhu
3 Replies

2. Shell Programming and Scripting

script to monitor process running on server and posting a mail if any process is dead

Hello all, I would be happy if any one could help me with a shell script that would determine all the processes running on a Unix server and post a mail if any of the process is not running or aborted. Thanks in advance Regards, pradeep kulkarni. :mad: (13 Replies)
Discussion started by: pradeepmacha
13 Replies

3. UNIX for Dummies Questions & Answers

Running different process from current process?

I have been having some trouble trying to get some code working, so I was wondering...what system calls are required to execute a different program from an already running process? (1 Reply)
Discussion started by: Midwest Product
1 Replies

4. Shell Programming and Scripting

not del a file not affecting other permissions

i was faced by a question from a friend. i found it very tricky. all my months of learning unix i never can figure it out still. heres the question he faced me with. wondering if you all can help me figure a solution. ill let him know the forums helped me out :D What command would you use... (10 Replies)
Discussion started by: sunny231
10 Replies

5. UNIX for Dummies Questions & Answers

How a process can check if a particular process is running on different machine?

I have process1 running on one machine and generating some log file. Now another process which can be launched on any machine wants to know if process1 is running or not and also in case it is running it wants to stream the logs file generated by process1 on terminal from which process2 is... (2 Replies)
Discussion started by: saurabhnsit2001
2 Replies

6. Shell Programming and Scripting

Perl cisco copy running to startup

Hi all, i have a small simple perl that i cant make it work it is really stupid but i cant find solution and i needed fast. im trying to copy running to startup on a cisco router and show me the output like is ok Destination filename ? Building configuration... so the code i have is ... (0 Replies)
Discussion started by: IvanMP
0 Replies

7. BSD

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (0 Replies)
Discussion started by: naveeng
0 Replies

8. UNIX for Advanced & Expert Users

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (1 Reply)
Discussion started by: naveeng
1 Replies

9. UNIX for Advanced & Expert Users

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (6 Replies)
Discussion started by: naveeng
6 Replies

10. Shell Programming and Scripting

Command to get exact tomcat process I am running ignoring other java process

Team, I have multiple batchjobs running in VM, if I do ps -ef |grep java or tomcat I am getting multiple process list. How do I get my exact tomcat process running and that is unique? via shell script? (4 Replies)
Discussion started by: Ghanshyam Ratho
4 Replies
SCHED_SETPARAM(2)					      BSD System Calls Manual						 SCHED_SETPARAM(2)

NAME
sched_setparam, sched_getparam -- set/get scheduling parameters LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sched.h> int sched_setparam(pid_t pid, const struct sched_param *param); int sched_getparam(pid_t pid, struct sched_param *param); DESCRIPTION
The sched_setparam() system call sets the scheduling parameters of the process specified by pid to the values specified by the sched_param structure pointed to by param. The value of the sched_priority member in the param structure must be any integer within the inclusive prior- ity range for the current scheduling policy of the process specified by pid. Higher numerical values for the priority represent higher pri- orities. 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 parameters are set for the process whose process ID is equal to pid. If pid is zero, the 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 target process, whether it is running or not running, will resume execution after all other runnable processes of equal or greater prior- ity have been scheduled to run. If the priority of the process specified by the pid argument is set higher than that of the lowest priority running process and if the speci- fied process is ready to run, the process specified by the pid argument will preempt a lowest priority running process. Similarly, if the process calling sched_setparam() sets its own priority lower than that of one or more other nonempty process lists, then the process that is the head of the highest priority list will also preempt the calling process. Thus, in either case, the originating process might not receive notification of the completion of the requested priority change until the higher priority process has executed. In this implementation, when the current scheduling policy for the process specified by pid is normal timesharing (SCHED_OTHER, aka SCHED_NORMAL when not POSIX-source) or the idle policy (SCHED_IDLE when not POSIX-source) then the behavior is as if the process had been running under SCHED_RR with a priority lower than any actual realtime priority. The sched_getparam() system call will return the scheduling parameters of a process specified by pid in the sched_param structure pointed to by param. 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_getparam 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] For sched_setparam(): one or more of the requested scheduling parameters is outside the range defined for the scheduling policy of the specified pid. SEE ALSO
sched_get_priority_max(2), sched_get_priority_min(2), sched_getscheduler(2), sched_rr_get_interval(2), sched_setscheduler(2), sched_yield(2) STANDARDS
The sched_setparam() and sched_getparam() 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 08:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy