Sponsored Content
Top Forums Programming Notification email in C program, via system call? or? Post 302503312 by zaxxon on Thursday 10th of March 2011 07:17:21 AM
Old 03-10-2011
Moving thread to the programming area.
 

10 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Why am I not recieving email notification?

I have been a member for almost a year now. I have always recieved email notifications when I select "subcribe to this thread" at the bottom of posts that I reply to. However, over the last month or so, I have not been recieving email notification of replys to posts I respond to. I have... (6 Replies)
Discussion started by: Kelam_Magnus
6 Replies

2. UNIX for Dummies Questions & Answers

How to add email notification in scripts?

Hi. I want to add email notification so when the my script finishes it sends out an email of the results to our team. If there are errors the subject on the email should say there were errors. If any having idea/sample scripts pls share with me. (2 Replies)
Discussion started by: redlotus72
2 Replies

3. AIX

Problem with Cron Email Notification

I have two different cron jobs that run on the same days. The jobs are 7 hours apart. Both jobs are set to send notification emails when they start running. Both jobs always run successfully, but I only receive an email from the first job. I never get the email from the second job. ... (1 Reply)
Discussion started by: sasaliasim
1 Replies

4. AIX

Cron Job notification email

Hi, I'm fairly new to Aix and am looking for some help on the following. I have setup a cron job under root and want it to send the email once it's run to an external email address. I can get it to send the output in an email to me by using mail on the end of the crontab entry. But I would... (1 Reply)
Discussion started by: elmesy
1 Replies

5. Programming

A question about the system call mount in a C program

Dear all, Currently I'm working on a C program (OS = ubuntu 9.0.4)in which a USB key will be mounted and umounted for several times. I read the man page of the mount system call. I use the following test code #include <sys/mount.h> int main(int argc, char *argv) { if... (5 Replies)
Discussion started by: dariyoosh
5 Replies

6. UNIX for Advanced & Expert Users

Linux-Heartbeat Email Notification

hi guys I hope this goes here Have someone used Linux heartbeat to send email when the Slave server becomes the Master? I've read I can configure the MailTo under /etc/ha.d/resource.d but I really don't know how to do it. I basically need my primary server to send an email when it... (2 Replies)
Discussion started by: karlochacon
2 Replies

7. Homework & Coursework Questions

program to send messages to parent using pipes and select system call

Write a program using select, which will create some number of child processes that continuously send text messages to the parent process using pipes. Each child has its own pipe that it uses to communicate with the parent. The parent uses select () to decide what pipes should be processed to... (1 Reply)
Discussion started by: ripssingh
1 Replies

8. Shell Programming and Scripting

Add Email Notification to Rsync

HI what i need to be able to do is add a email to the end of a rsync. my current ion configures writes a daily log to disk, but real want to send the log to a central email address. The current script is as below, is this possible? #!/bin/bash if then rsync -aWv --stats progress... (3 Replies)
Discussion started by: treds
3 Replies

9. Homework & Coursework Questions

Help with Execl system call in a C program?

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: "Your a7.c program should use printf to print a nice message. (You can decide what to say.) Then the process... (9 Replies)
Discussion started by: miniviking10
9 Replies

10. Shell Programming and Scripting

Email Notification

Hi All, I need write a linux script which emails each record to the employee manager email-id which will be specified inside the file. Each employee can have a different manager too.. file contain 200 to 300 records Employee ID, Employee Name, Employee Email-ID, Manager, Manager... (4 Replies)
Discussion started by: tradingspecial
4 Replies
PTHREAD_ATTR_SETGUARDSIZE(3)				     Linux Programmer's Manual				      PTHREAD_ATTR_SETGUARDSIZE(3)

NAME
pthread_attr_setguardsize, pthread_attr_getguardsize - set/get guard size attribute in thread attributes object SYNOPSIS
#include <pthread.h> int pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize); int pthread_attr_getguardsize(pthread_attr_t *attr, size_t *guardsize); Compile and link with -pthread. DESCRIPTION
The pthread_attr_setguardsize() function sets the guard size attribute of the thread attributes object referred to by attr to the value specified in guardsize. If guardsize is greater than 0, then for each new thread created using attr the system allocates an additional region of at least guardsize bytes at the end of the thread's stack to act as the guard area for the stack (but see BUGS). If guardsize is 0, then new threads created with attr will not have a guard area. The default guard size is the same as the system page size. If the stack address attribute has been set in attr (using pthread_attr_setstack(3) or pthread_attr_setstackaddr(3)), meaning that the caller is allocating the thread's stack, then the guard size attribute is ignored (i.e., no guard area is created by the system): it is the application's responsibility to handle stack overflow (perhaps by using mprotect(2) to manually define a guard area at the end of the stack that it has allocated). The pthread_attr_getguardsize() function returns the guard size attribute of the thread attributes object referred to by attr in the buffer pointed to by guardsize. RETURN VALUE
On success, these functions return 0; on error, they return a nonzero error number. ERRORS
POSIX.1-2001 documents an EINVAL error if attr or guardsize is invalid. On Linux these functions always succeed (but portable and future- proof applications should nevertheless handle a possible error return). VERSIONS
These functions are provided by glibc since version 2.1. CONFORMING TO
POSIX.1-2001. NOTES
A guard area consists of virtual memory pages that are protected to prevent read and write access. If a thread overflows its stack into the guard area, then, on most hard architectures, it receives a SIGSEGV signal, thus notifying it of the overflow. Guard areas start on page boundaries, and the guard size is internally rounded up to the system page size when creating a thread. (Nevertheless, pthread_attr_getguardsize() returns the guard size that was set by pthread_attr_setguardsize().) Setting a guard size of 0 may be useful to save memory in an application that creates many threads and knows that stack overflow can never occur. Choosing a guard size larger than the default size may be necessary for detecting stack overflows if a thread allocates large data struc- tures on the stack. BUGS
As at glibc 2.8, the NPTL threading implementation includes the guard area within the stack size allocation, rather than allocating extra space at the end of the stack, as POSIX.1 requires. (This can result in an EINVAL error from pthread_create(3) if the guard size value is too large, leaving no space for the actual stack.) The obsolete LinuxThreads implementation did the right thing, allocating extra space at the end of the stack for the guard area. EXAMPLE
See pthread_getattr_np(3). SEE ALSO
mmap(2), mprotect(2), pthread_attr_init(3), pthread_attr_setstack(3), pthread_attr_setstacksize(3), pthread_create(3), pthreads(7) COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2008-10-24 PTHREAD_ATTR_SETGUARDSIZE(3)
All times are GMT -4. The time now is 09:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy