Sponsored Content
Top Forums Programming A weird problem with POSIX function Post 302561640 by Corona688 on Tuesday 4th of October 2011 05:07:26 PM
Old 10-04-2011
Quote:
Originally Posted by bus147
I used MSVC2010 for testing your code
That's probably your problem. Try a UNIX system.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Weird Problem???

I have a problem I don't understand... I am trying to declare a variable, and then output the results of that variable, couldn't be simpler #!/bin/ksh VAR='Oranges' if then echo "Found Lemons" elif then echo "Found Oranges" fi The output shouold clearly be "Found Oranges", but... (2 Replies)
Discussion started by: danhodges99
2 Replies

2. Solaris

Weird crontab problem

Greetings To All! I am running Solaris 10 in a sparc environment. Here is the deal: In /var/spool/cron/crontabs, there is a cron user named "sys". If I do a crontab -l sys, it returns: # 0 * * * 0-6 /usr/lib/sa/sa1 # 20,40 8-17 * * 1-5 /usr/lib/sa/sa1 # 5 18 * * 1-5 /usr/lib/sa/sa2... (8 Replies)
Discussion started by: RobSand
8 Replies

3. Programming

Problem with POSIX pthreads and virtual memory

Hi, i have this code... in order to test my problem... #include <stdio.h> #include <iostream> #include <pthread.h> static void* cliente(void *datos); int main() { pthread_attr_t tattr; int ret; size_t size = PTHREAD_STACK_MIN + 0x0100; ret =... (8 Replies)
Discussion started by: JEscola
8 Replies

4. UNIX for Dummies Questions & Answers

Weird character in between echo function

Hi All, Appreciate if anyone can help. I've a script where it does echo function like this while do FILE_ARG="cu0${w}_${FILE}_${DT}.av" ORACLE_ERROR=`grep "ORA-" ${FILE_ARG}` if ]; then Func_Log_Writer "Fail! ${FILE_ARG}\n" Func_Log_Writer "Error message:... (2 Replies)
Discussion started by: agathaeleanor
2 Replies

5. UNIX for Advanced & Expert Users

Really weird delete problem

Hi, I've Ubuntu 8.04, and it has some files that I just cannot delete. I've tried everything, inode, fsck etc. Here is what the ls -li outputs root@ubuntu:/home/luser/.local/share/Trash/files/junk# ls -l ls: cannot access TRUNK_: No such file or directory ls: cannot access 2006_output.mv:... (11 Replies)
Discussion started by: nitin
11 Replies

6. Infrastructure Monitoring

Weird dependency problem!

Hi, I want to install net-snmp-devel package but i have following dependecy problem. It's very odd, i don't get it. One of packages is depended on the other one, the other one is depended on the previous one as well. :S :S Could you help me please? Here are the steps: # ls -l total... (4 Replies)
Discussion started by: oduth
4 Replies

7. Shell Programming and Scripting

In bash getting weird output from function ?

My script- result="" times() { echo "inside the times function" result=8 echo "Inside function $result" return $result } result=$(times) echo "the value is "$? echo "the value of result $result" when I run I get this, why the value still remain 0. $ ./func the value is 0 the value... (5 Replies)
Discussion started by: boy18nj
5 Replies

8. Programming

Compilation problem with Posix Mes Q

Hi #include "training.h" #include <mqueue.h> // for posix mqs int main(int argc,char *argv) { int opt,flag; mqd_t msq; // msg q type flag=O_RDWR|O_CREAT; while((opt =getopt(argc,argv,"e")) != -1) { switch(opt) { case 'e': ... (4 Replies)
Discussion started by: kumaran_5555
4 Replies

9. UNIX for Advanced & Expert Users

Linkage of POSIX threads function calls

I wonder if someone knows what is the rationale behind linking function calls of the POSIX threads library at link-time vs. run-time. For example, if I create the following program: #include <pthread.h> void noop() { return; } int main() { pthread_self(); pthread_atfork(noop,... (1 Reply)
Discussion started by: jsimsa
1 Replies

10. Shell Programming and Scripting

Weird awk problem

Hi, I have a simple awk script: BEGIN{} { $a=$2-$1; print $a } END{if(NR==0){ print "0" } } to which I provide the following input 2.9 14 22.2 27 (4 Replies)
Discussion started by: jamie_123
4 Replies
UALARM(3)						     Linux Programmer's Manual							 UALARM(3)

NAME
ualarm - schedule signal after given number of microseconds SYNOPSIS
#include <unistd.h> useconds_t ualarm(useconds_t usecs, useconds_t interval); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): ualarm(): _BSD_SOURCE || _XOPEN_SOURCE >= 500 DESCRIPTION
The ualarm() function causes the signal SIGALRM to be sent to the invoking process after (not less than) usecs microseconds. The delay may be lengthened slightly by any system activity or by the time spent processing the call or by the granularity of system timers. Unless caught or ignored, the SIGALRM signal will terminate the process. If the interval argument is nonzero, further SIGALRM signals will be sent every interval microseconds after the first. RETURN VALUE
This function returns the number of microseconds remaining for any alarm that was previously set, or 0 if no alarm was pending. ERRORS
EINTR Interrupted by a signal. EINVAL usecs or interval is not smaller than 1000000. (On systems where that is considered an error.) CONFORMING TO
4.3BSD, POSIX.1-2001. POSIX.1-2001 marks ualarm() as obsolete. POSIX.1-2008 removes the specification of ualarm(). 4.3BSD, SUSv2, and POSIX do not define any errors. NOTES
The type useconds_t is an unsigned integer type capable of holding integers in the range [0,1000000]. On the original BSD implementation, and in glibc before version 2.1, the arguments to ualarm() were instead typed as unsigned int. Programs will be more portable if they never mention useconds_t explicitly. The interaction of this function with other timer functions such as alarm(2), sleep(3), nanosleep(2), setitimer(2), timer_create(2), timer_delete(2), timer_getoverrun(2), timer_gettime(2), timer_settime(2), usleep(3) is unspecified. This function is obsolete. Use setitimer(2) or POSIX interval timers (timer_create(2), etc.) instead. SEE ALSO
alarm(2), getitimer(2), nanosleep(2), select(2), setitimer(2), usleep(3), time(7) COLOPHON
This page is part of release 3.25 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/. 2008-08-06 UALARM(3)
All times are GMT -4. The time now is 04:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy