Sponsored Content
Full Discussion: Take over a Bash-process.
Special Forums Cybersecurity Take over a Bash-process. Post 302372445 by jim mcnamara on Wednesday 18th of November 2009 03:08:20 AM
Old 11-18-2009
The /proc directories for the user process have that a lot of that infomation.
Try info proc or man proc. I am assuming Linux becuase you mentioned bash.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

starting a bash session as child process to another bash session from a process

Hi I want to do something that might sound strange. I have a code that in written in C and is executed at startup (it's a custom process). It occasionally calls some bash scripts. The process doesn't have any terminal associated with it. One thing I don't know how to do is to start a... (5 Replies)
Discussion started by: alirezan
5 Replies

2. Shell Programming and Scripting

Catching SIG of running process with bash

Hello all! I'm writing a script that will catch when an outside process crashes (SIGHUP, right?) without having to loop into infinity. With that in mind, I came across the trap utility and thought if could be used to monitor another process other than it's own. But from what I've read, I'm... (1 Reply)
Discussion started by: mashiox
1 Replies

3. Shell Programming and Scripting

[KSH/Bash] Starting a parent process from a child process?

Hey all, I need to launch a script from within 2 other scripts that can run independently of the two parent scripts... Im having a hard time doing this, if anyone knows how please let me know. More detail. ScriptA (bash), ScriptB (ksh), ScriptC (bash) ScriptA, launches ScriptB ScirptB,... (7 Replies)
Discussion started by: trey85stang
7 Replies

4. Shell Programming and Scripting

bash: closing file descriptors from a process

Below is a test script to illustrate a problem from a larger script I am writing. $ cat /tmp/loggingtest #!/bin/bash lvcreate -s -l 100%FREE -n var-data-snapshot vg00/var-data 2> >(logger -t "loggingtest.crit") 1> >(logger -t "loggingtest.info") sync & wait lvremove -f... (1 Reply)
Discussion started by: jelloir
1 Replies

5. Shell Programming and Scripting

Bash process output analysis

Looking to create a script to listen to each output from a task while it is running and launch a function if a specific error message is found at any point and if not to continue uninterrupted. #!/bin/bash read checker <<< $(reaver -i mon0 -b 'target bssid' -vv) if ; then function elif... (1 Reply)
Discussion started by: 3therk1ll
1 Replies

6. Shell Programming and Scripting

Help about bash process

I have function f1 and f2, I want it excute five items with different function in the list the the same time with process. I did a testing in start_build_feature1, it sleep about 100s, in the sleeping start_build_feature2 print nothing, can someone help me modify this scripts I don't when... (2 Replies)
Discussion started by: yanglei_fage
2 Replies

7. Shell Programming and Scripting

Killing a bash process and running the second part of script

I want to run a script that calls remote ssh and if it gets hung, I want to be able to kill that part of the script and run another command in the script for example I have a statement like this: if ]; then export tapes=$(for tape in $(su - nacct -c 'ssh remote1 "cat... (1 Reply)
Discussion started by: newbie2010
1 Replies

8. Shell Programming and Scripting

Bash-awk to process thousands of files

Hi to all, I have thousand of files in a folder with names with format "FILE-YYYY-MM-DD-HHMM" for what I want to send the following AWK command awk '/Code.*/' FILE-2014* I'd like to separate all files that have the same date to a folder named with the corresponding date. For example, if I... (7 Replies)
Discussion started by: Ophiuchus
7 Replies

9. Shell Programming and Scripting

Bash process timer

I have a bash with several processes in it, that I would like to include a progress bar or percentage complete. Below are two separate processes that, so the user knows that something is happening, there is an an indicator for each process. Maybe, at the start of each new process a printf the... (2 Replies)
Discussion started by: cmccabe
2 Replies

10. Shell Programming and Scripting

Use the get and post method in the bash ( multi process)?

hi I want to call a lot of links with the post method What to do to speed it up?? ####This method is slow #!/bin/bash func2() { index1=0 while read line ; do index1=$(($index1+1)) url=$line done < tmp/url1.txt } (10 Replies)
Discussion started by: mnnn
10 Replies
sem_post(2)							System Calls Manual						       sem_post(2)

NAME
sem_post - unlock a POSIX semaphore SYNOPSIS
DESCRIPTION
is used to post the semaphore referenced by sem. The calling thread will not return from its call to unless it can either: increment the semaphore value, if there are no blocked threads on this semaphore; give the semaphore to a blocked thread, if there are any blocked threads on this semaphore; or have an error condition. If the semaphore value is < 0, the semaphore has blocked threads, waiting for it to become available (the absolute value of the semaphore's value indicates the number of waiters at that moment). If the semaphore value is >= 0, the semaphore has no waiters. If the semaphore has no waiters at the time its value is checked, the semaphore's value will be atomically incremented, with respect to the checking of its value, up to its maximum value as specified by If the semaphore has waiters at the time its value is checked, the semaphore value is not changed. Instead, the calling thread will attempt to wake up a waiter. If the semaphore has waiters having realtime priori- ties, the thread must wake up the highest priority waiter. Otherwise the thread at the head of the channel queue is woken up. When a waiter is successfully woken, the semaphore being posted will be given to the woken waiter. In other words, the state of the sema- phore remains unchanged. Instead, the semaphore being posted will be inherited by the waiter being woken from this call to If the specified semaphore referred to by sem is a named semaphore, then this semaphore must have been opened by the calling process with The calling process must have both read and write permissions on the semaphore to perform this operation. The routine may be called asyn- chronously, i.e. from a signal handler. To use this function, link in the realtime library by specifying on the compiler or linker command line. EXAMPLES
The following call to will post the semaphore sem. RETURN VALUE
A successful call to will return 0 and the calling thread would have posted the semaphore. Otherwise, the call to will return -1 with errno set to the appropriate value of the error condition. ERRORS
fails and does not perform the requested operation if any of the following conditions are encountered: [EPERM] The calling process does not have the privileges necessary to post the semaphore. [EINVAL] The argument sem does not refer to a valid semaphore. SEE ALSO
<semaphore.h>. STANDARDS CONFORMANCE
sem_post(2)
All times are GMT -4. The time now is 08:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy