Well, good point, I've changed my code a little a while ago. Tried putting the final
inside father's "if" but it doesn't look like changing anything...
Please, have a look now, It's working almost like I want it. The thing I'm missing is piping back the result from child to parent.
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)
:(
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)
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)
I need to send the status from child shell failure to parent shell. I would like to know how could we accomplish this.
My parent.sh is as below:
#!/bin/ksh
set -x
echo "I am in parent shell now..."
child.sh
ret_stat=$?
echo "rest_stat=$ret_stat"
echo "I am below parent shell end..."
... (4 Replies)
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)
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)
i used function fork().
so i made two process.
parent process accepted socket fd and writing to shared memory.
then now. how can child process share parent's socket fd?
is this possible?
Thanks in advance (1 Reply)
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)
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)
does anyone know how to check in an 'if' statement if a particular directory is a child directory of a particular directory?
help ~ (2 Replies)
Discussion started by: ymc1g11
2 Replies
LEARN ABOUT SUSE
ll_rw_block
LL_RW_BLOCK(9) The Linux VFS LL_RW_BLOCK(9)NAME
ll_rw_block - level access to block devices (DEPRECATED)
SYNOPSIS
void ll_rw_block(int rw, int nr, struct buffer_head * bhs[]);
ARGUMENTS
rw
whether to READ or WRITE or SWRITE or maybe READA (readahead)
nr
number of struct buffer_heads in the array
bhs[]
array of pointers to struct buffer_head
DESCRIPTION
ll_rw_block takes an array of pointers to struct buffer_heads, and requests an I/O operation on them, either a READ or a WRITE. The third
SWRITE is like WRITE only we make sure that the *current* data in buffers are sent to disk. The fourth READA option is described in the
documentation for generic_make_request which ll_rw_block calls.
This function drops any buffer that it cannot get a lock on (with the BH_Lock state bit) unless SWRITE is required, any buffer that appears
to be clean when doing a write request, and any buffer that appears to be up-to-date when doing read request. Further it marks as clean
buffers that are processed for writing (the buffer cache won't assume that they are actually clean until the buffer gets unlocked).
ll_rw_block sets b_end_io to simple completion handler that marks the buffer up-to-date (if approriate), unlocks the buffer and wakes any
waiters.
All of the buffers must be for the same device, and must also be a multiple of the current approved size for the device.
COPYRIGHT Kernel Hackers Manual 2.6. July 2010 LL_RW_BLOCK(9)