Sponsored Content
Full Discussion: parent and child directory
Top Forums UNIX for Dummies Questions & Answers parent and child directory Post 302622093 by Corona688 on Wednesday 11th of April 2012 01:57:18 PM
Old 04-11-2012
Do you have the absolute path of the folder?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

what are parent and child processes all about?

I don't follow what these are... this is what my text says... "When a process is started, a duplicate of that process is created. This new process is called the child and the process that created it is called the parent. The child process then replaces the copy for the code the parent... (1 Reply)
Discussion started by: xyyz
1 Replies

2. Filesystems, Disks and Memory

How hard can it be? ps child/parent

:( Since I'm fairly new to the scene and don't have much experience in shell programming, I decided to check out the net for a useful script or two. What I'm looking for is a script that would let me enter a PID and then show the process tree associated with it. So it would display the (grand-)... (2 Replies)
Discussion started by: velde046
2 Replies

3. UNIX for Dummies Questions & Answers

kill parent and child

Hello all, I have gone through the search and looked at posting about idle users and killing processes. Here is my question I would like to kill an idle user ( which I can do) but how can I asure that all of his process is also killed whit out tracing his inital start PID. I have tried this on a... (4 Replies)
Discussion started by: larry
4 Replies

4. Shell Programming and Scripting

Parent/Child Processes

Hello. I have a global function name func1() that I am sourcing in from script A. I call the function from script B. Is there a way to find out which script called func1() dynamically so that the func1() can report it in the event there are errors? Thanks (2 Replies)
Discussion started by: yoi2hot4ya
2 Replies

5. UNIX for Advanced & Expert Users

Child Killing Parent

Hi all, I am writing a script which calls other third party scripts that perform numerous actions. I have no control over these scripts. My problem is, one of these scripts seems to execute and do what it is meant to do, but my calling / parent script always exits at that point. I need to... (4 Replies)
Discussion started by: mark007
4 Replies

6. AIX

Parent directory seems to disappear if child fails rename

If I have a file/folder that a user does not have permission to and I try to rename it, it removes the entire parent folder. At that point it is only visible in a ls. (Not a ls -l, file, more, cd). It happens on every filesystem. This is Aix 5.3 $ cd test $ ls -la total 0 drwxr-xr-x 2 root ... (4 Replies)
Discussion started by: scriptr2be
4 Replies

7. UNIX for Dummies Questions & Answers

Parent/child directory permission

Hi there, I want to restrict a users account to only a subdirectory, but it does not seem to be working. For example /dir1/dir2/dir3/dir4 user A is only allowed to do things in dir4. the permission is 777. i've set the permissions to 700 on dir3, dir2, and dir1 to prevent them from... (3 Replies)
Discussion started by: newbie121
3 Replies

8. Homework & Coursework Questions

Need help with deleting childīs parent and child subprocess

1. The problem statement, all variables and given/known data: I need to make an program that in a loop creates one parent and five children with fork(). The problem i'm trying to solve is how to delete the parent and child of the childīs process. 2. Relevant commands, code, scripts,... (0 Replies)
Discussion started by: WhiteFace
0 Replies

9. Shell Programming and Scripting

forking a child process and kill its parent to show that child process has init() as its parent

Hi everyone i am very new to linux , working on bash shell. I am trying to solve the given problem 1. Create a process and then create children using fork 2. Check the Status of the application for successful running. 3. Kill all the process(threads) except parent and first child... (2 Replies)
Discussion started by: vizz_k
2 Replies

10. Shell Programming and Scripting

Parent Child directory and file details

Kindly help below command details in UNIX. 1.What is the Unix command to see parent and child directory details starting from root directory in tree structure using LS-LRT or any other way 2.What is the Unix command to see parent and child directory details starting from root directory in... (2 Replies)
Discussion started by: skp
2 Replies
fork(2) 							System Calls Manual							   fork(2)

NAME
fork, vfork - Creates a new process SYNOPSIS
#include <unistd.h> pid_t fork (void); pid_t vfork (void); Application developers may want to specify an #include statement for <sys/types.h> before the one for <unistd.h> if programs are being developed for multiple platforms. The additional #include statement is not required on Tru64 UNIX systems or by ISO or X/Open standards, but may be required on other vendors' systems that conform to these standards. STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: fork(): XSH5.0 vfork(): XSH5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. DESCRIPTION
The fork() and vfork() functions create a new process (child process) that is identical to the calling process (parent process). The child process inherits the following attributes from the parent process: Environment Close-on-exec flags Signal handling settings Set user ID mode bit Set group ID mode bit Trusted state Profiling on/off status Nice value All attached shared libraries Process group ID tty group ID Current directory Root directory File mode creation mask File size limit Attached shared memory segments Attached mapped file seg- ments All mapped regions with the same protection and sharing mode as in the parent process Its own copy of the parent's open directory streams The child process differs from the parent process in the following ways: The child process has a unique process ID that does not match any active process group ID. The parent process ID of the child process matches the process ID of the parent. The child process has its own copy of the parent process's file descriptors. Each of the child's file descriptors refers to the same open file description with the cor- responding file descriptor of the parent process. The child process has its own copy of the parent's open directory streams. Each open directory stream in the child process may share directory stream positioning with the corresponding directory stream of the parent. All semadj values are cleared. Process locks, text locks, and data locks are not inherited by the child process. The child process' values of tms_utime, tms_stime, tms_cutime, and tms_cstime are set to 0 (zero). Any pending alarms are cleared in the child process. [Tru64 UNIX] Any interval timers enabled by the parent process are reset in the child process. Any signals pending for the parent process are cleared for the child process. NOTES
If a multithreaded process forks a child process, the new process contains a replica of the calling thread and its entire address space, possibly including the states of mutexes and other resources. Consequently, to avoid errors, the child process should only execute opera- tions it knows will not cause deadlock. The fork() and vfork() functions have essentially the same implementation at the level of the operating system kernel but may differ in how they are supported through different libraries. Some libraries, such as libpthread and libc, support fork handler routines that can acquire and release resources that are critical to the child process. Fork handlers therefore allow an application to manage potential deadlock situations that might occur between the parent and child processes. Fork handlers do not work correctly if the application calls vfork() to create the child process. Therefore, applications using libpthread and libc should call fork() to create a child process. For more information about fork handler routines, see pthread_atfork(3). For a complete list of system calls that are reentrant with respect to signals, see signal(4). RETURN VALUES
Upon successful completion, the fork() and vfork() functions return a value of 0 (zero) to the child process and return the process ID of the child process to the parent process. Otherwise, a value of -1 is returned to the parent, no child process is created, and errno is set to indicate the error. ERRORS
The fork() and vfork() functions set errno to the specified values for the following conditions: The limit on the total number of processes executing for a single user would be exceeded. This limit can be exceeded by a process with superuser privilege. There is not enough space left for this process. RELATED INFORMATION
Functions: exec(2), exit(2), getpriority(2), getrusage(2), plock(2), ptrace(2), semop(2), shmat(2), sigaction(2), sigvec(2), umask(2), wait(2) Routines: nice(3), pthread_atfork(3), raise(3), times(3), ulimit(3) Files: signal(4) Standards: standards(5) delim off fork(2)
All times are GMT -4. The time now is 09:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy