05-04-2011
Strange, Ctrl+D should have worked. With Ctrl+Z, you've sent the program into the background, suspending its execution, so there won't be any more output (check the output of ps -ef, and you'll see them floating around).
This User Gave Thanks to pludi For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
how to check input is "empty" and "numeric" in ksh?
e.g:
./myscript.ksh k
output show: invalid number input
./myscript.ksh
output show: no input
./myscript.ksh 10
output show: input is numeric (6 Replies)
Discussion started by: geoffry
6 Replies
2. Shell Programming and Scripting
I have a trouble in my script when i use EOF inside block if.
If i use EOF whitout block if I don´t have problem.
Guys any ideas?
Sorry for my terrible English.
#!/bin/sh
set -xv
HOST='ftp.fiction.com.br'
USER='fictionuser'
PASS='fictionpass'
FILE='ftpteste.txt'
busca=`find... (4 Replies)
Discussion started by: ricardo.ludwig
4 Replies
3. Solaris
Rebuilding a server (T2000) from a flash archive I created on another server. Using a Solaris 10/08 DVD to boot from the was going to point it tot he flash archive and pull it over NFS. I've done this many times with success until now.
It initially boots off the DVD, you input the... (5 Replies)
Discussion started by: Probos
5 Replies
4. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
5. Programming
Hello all,
Is there any way that I can signal (wake) all threads that I have created without using pthread_cond_broadcast?
Cheers!
Aaron (6 Replies)
Discussion started by: mobility
6 Replies
6. Solaris
Well, my first post... thanks in advance! Can applications be notified of the X Window close (with "X" button) so the signal handler can run a cleanup process method?
About the app: built with GNU C/C++ on Solaris 10, with WxWidgets. It is launched by a shell script as a background task. The... (2 Replies)
Discussion started by: HandsOGold
2 Replies
7. Shell Programming and Scripting
// AIX 6.1
What I am trying to accomplish is to display the user name and the last login date and time in one line:
for usrlist in $(cat alluser.txt)
do
$usrlist
perl -e 'print scalar localtime `lsuser -a time_last_login $usrlist | awk -F '=' '{print $2}'`'
done
However, it... (8 Replies)
Discussion started by: Daniel Gate
8 Replies
8. UNIX for Dummies Questions & Answers
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
9. SCO
Hi, I am a new Unix Guru with very little experience but have the task of P2Ving an old HP Proliant ML370 G5 server to VMware ESX 4.1 or ESXi 5.5.
System seems to boots fine but when trying to remove HP software, configure TCP/IP or a driver, I am receiving:
--------
... (7 Replies)
Discussion started by: dj_Italian
7 Replies
10. Shell Programming and Scripting
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
LEARN ABOUT SUNOS
stack_violation
stack_violation(3C) Standard C Library Functions stack_violation(3C)
NAME
stack_violation - determine stack boundary violation event
SYNOPSIS
#include <ucontext.h>
int stack_violation(int sig, const siginfo_t *sip, const ucontext_t *ucp);
DESCRIPTION
The stack_violation() function returns a boolean value indicating whether the signal, sig, and accompanying signal information, sip, and
saved context, ucp, represent a stack boundary violation event or a stack overflow.
RETURN VALUES
The stack_violation() function returns 0 if the signal does not represent a stack boundary violation event and 1 if the signal does repre-
sent a stack boundary violation event.
ERRORS
No errors are defined.
EXAMPLES
Example 1: Set up a signal handler to run on an alternate stack.
The following example sets up a signal handler for SIGSEGV to run on an alternate signal stack. For each signal it handles, the handler
emits a message to indicate if the signal was produced due to a stack boundary violation.
#include <stdlib.h>
#include <unistd.h>
#include <ucontext.h>
#include <signal.h>
static void
handler(int sig, siginfo_t *sip, void *p)
{
ucontext_t *ucp = p;
const char *str;
if (stack_violation(sig, sip, ucp))
str = "stack violation.
";
else
str = "no stack violation.
";
(void) write(STDERR_FILENO, str, strlen(str));
exit(1);
}
int
main(int argc, char **argv)
{
struct sigaction sa;
stack_t altstack;
altstack.ss_size = SIGSTKSZ;
altstack.ss_sp = malloc(SIGSTKSZ);
altstack.ss_flags = 0;
(void) sigaltstack(&altstack, NULL);
sa.sa_sigaction = handler;
(void) sigfillset(&sa.sa_mask);
sa.sa_flags = SA_ONSTACK | SA_SIGINFO;
(void) sigaction(SIGSEGV, &sa, NULL);
/*
* The application is now set up to use stack_violation(3C).
*/
return(0);
}
USAGE
An application typically uses stack_violation() in a signal handler that has been installed for SIGSEGV using sigaction(2) with the SA_SIG-
INFO flag set and is configured to run on an alternate signal stack.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |Async-Signal-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
sigaction(2), sigaltstack(2), stack_getbounds(3C), stack_inbounds(3C), stack_setbounds(3C), attributes(5)
SunOS 5.10 18 Jul 2002 stack_violation(3C)