Sponsored Content
Top Forums Shell Programming and Scripting [QUESTION] While umatched error Post 302732595 by Ryuinferno on Sunday 18th of November 2012 03:46:26 PM
Old 11-18-2012
Ok...but even though I set the condition for the while loop as [ $finish -ne 1 ], I still get the same error...what should I do to make a correct initialisation?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Error Question

Every night I recieve this message: Verify Report - Broken/missing symbolic links File With Discrepancies : 213 Total Discrepancies : 213 Can anyone explain what this is and how I can resolve it? Thanks, DJ At Work (4 Replies)
Discussion started by: djatwork
4 Replies

2. UNIX for Advanced & Expert Users

Question about error

While attempting to use ftp to retrieve a file from a remote server (running SCO Unix 5.0.2), it eventually returns a timeout error with the following message - netin: connection reset by peer. I can't find any reference to this error. Has anyone encountered it before, or know what causes it? (3 Replies)
Discussion started by: Howeird
3 Replies

3. Shell Programming and Scripting

Question about error reporting

hi all, i've got a script that takes in what a user enters (multiple entries) and then joins them all together and appends this to a file. what i want to happen now is the terminal should display "record saved" if the save to the file is successful, if it isn't just display the standard unix... (2 Replies)
Discussion started by: wazzag
2 Replies

4. Programming

C Question compilation error

What does the following mean: state_field state_abvr = { "AL","ALABAMA", "AK","ALASKA", . . . }; extern state_field state_abvr; issues we I am facing following compilation issue bosdf9d1:root make CC -I/bto/bcs/shared/include -I/bto/sys/BCS/usr/include ... (1 Reply)
Discussion started by: jaganreddy
1 Replies

5. Shell Programming and Scripting

Question on error from script

I used set -n FS.sh to check for syntax errors. No problems. I run the script with set -x and set -v with the following error: find: bad option ; find: path-list predicate-list Reviewing the verbose output everything is read correctly. The files transfer and the script completes. I can't seem... (4 Replies)
Discussion started by: BigSky
4 Replies

6. Filesystems, Disks and Memory

Question - error during boot

I have an HP NetServer LH3 which is exhibiting an error during the boot process. I am getting the following messages, none of which I've seen before 1. WARNING: SCSI adapter: Cannot install intr vecno=12 type=4 IPL=5 Vector 12 is private 2. WARNING: "TEST_UNIT_READY" Command timed 11 seconds... (0 Replies)
Discussion started by: slant-40
0 Replies

7. Programming

Newbie Question.. -> error: syntax error before ';' token

Hello, the following is generating a error at the line "tmprintf(&tmBundle, _TMC("{0}"),Prompt);"... a bit lost as I am diving into this debug... Thank you in advance... int H_YesNo(TMCHAR *Prompt, int DefVal) { TMCHAR YesNo = '\0'; tmprintf(&tmBundle, _TMC("{0}"),Prompt); while... (3 Replies)
Discussion started by: reelflytime
3 Replies

8. UNIX for Dummies Questions & Answers

Question on FTP Error Log

Hello All, Below is the control card or the file which i am using in shell script to mget files from remote machine via FTP. bash-3.00$ cat ftp_ALD_DAC.log open 10.xx.yy.zzz user D00000187 nb8tr4xx2u ascii cd prod/out lcd /Internal_Impact_TT_Input mget ALD*.TXT bye Below is the... (0 Replies)
Discussion started by: Ariean
0 Replies

9. Shell Programming and Scripting

Error redirection question

Hi gurus, I have a question, need some of your inputs... I have a command like this : export LINE_COUNT=`wc -l test.dat | awk '{print $1}'` echo $LINE_COUNT --- > gives me 2 which is fine as the file has 2 lines. This works fine if the file test.dat is present but in case... (3 Replies)
Discussion started by: calredd
3 Replies

10. Shell Programming and Scripting

Question about syntax error

first of all.. sorry about all the question bombing.. im bored atm so im currently playing around with sh scripting hehe s = `expr ls -s Documents | grep Music | awk '{ print $1 }' ` t = `expr $t + $s` it give syntax error s not found t not found lol... any idea why? (7 Replies)
Discussion started by: Nick1097
7 Replies
_lwp_cond_wait(2)						   System Calls 						 _lwp_cond_wait(2)

NAME
_lwp_cond_wait, _lwp_cond_timedwait, _lwp_cond_reltimedwait - wait on a condition variable SYNOPSIS
#include <sys/lwp.h> int _lwp_cond_wait(lwp_cond_t *cvp, lwp_mutex_t *mp); int _lwp_cond_timedwait(lwp_cond_t *cvp, lwp_mutex_t *mp, timestruc_t *abstime); int _lwp_cond_reltimedwait(lwp_cond_t *cvp, lwp_mutex_t *mp, timestruc_t *reltime); DESCRIPTION
These functions are used to wait for the occurrence of a condition represented by an LWP condition variable. LWP condition variables must be initialized to 0 before use. The _lwp_cond_wait() function atomically releases the LWP mutex pointed to by mp and causes the calling LWP to block on the LWP condition variable pointed to by cvp. The blocked LWP may be awakened by _lwp_cond_signal(2), _lwp_cond_broadcast(2), or when interrupted by delivery of a signal. Any change in value of a condition associated with the condition variable cannot be inferred by the return of _lwp_cond_wait() and any such condition must be re-evaluated. The _lwp_cond_timedwait() function is similar to _lwp_cond_wait(), except that the calling LWP will not block past the time of day speci- fied by abstime. If the time of day becomes greater than abstime, _lwp_cond_timedwait() returns with the error code ETIME. The _lwp_cond_reltimedwait() function is similar to _lwp_cond_wait(), except that the calling LWP will not block past the relative time specified by reltime. If the time of day becomes greater than the starting time of day plus reltime, _lwp_cond_reltimedwait() returns with the error code ETIME. The _lwp_cond_wait(), _lwp_cond_timedwait(), and _lwp_cond_reltimedwait() functions always return with the mutex locked and owned by the calling lightweight process. RETURN VALUES
Upon successful completion, 0 is returned. A non-zero value indicates an error. ERRORS
If any of the following conditions are detected, _lwp_cond_wait(), _lwp_cond_timedwait(), and _lwp_cond_reltimedwait() fail and return the corresponding value: EINVAL The cvp argument points to an invalid LWP condition variable or the mp argument points to an invalid LWP mutex. EFAULT The mp, cvp, or abstime argument points to an illegal address. If any of the following conditions occur, _lwp_cond_wait(), _lwp_cond_timedwait(), and _lwp_cond_reltimedwait() fail and return the corre- sponding value: EINTR The call was interrupted by a signal or fork(2). If any of the following conditions occur, _lwp_cond_timedwait() and _lwp_cond_reltimedwait() fail and return the corresponding value: ETIME The time specified inabstime or reltime has passed. EXAMPLES
Example 1: Use the _lwp_cond_wait() function in a loop testing some condition. The _lwp_cond_wait() function is normally used in a loop testing some condition, as follows: lwp_mutex_t m; lwp_cond_t cv; int cond; (void) _lwp_mutex_lock(&m); while (cond == FALSE) { (void) _lwp_cond_wait(&cv, &m); } (void) _lwp_mutex_unlock(&m); Example 2: Use the _lwp_cond_timedwait() function in a loop testing some condition. The _lwp_cond_timedwait() function is also normally used in a loop testing some condition. It uses an absolute timeout value as follows: timestruc_t to; lwp_mutex_t m; lwp_cond_t cv; int cond, err; (void) _lwp_mutex_lock(&m); to.tv_sec = time(NULL) + TIMEOUT; to.tv_nsec = 0; while (cond == FALSE) { err = _lwp_cond_timedwait(&cv, &m, &to); if (err == ETIME) { /* timeout, do something */ break; SENDwhom} } (void) _lwp_mutex_unlock(&m); This example sets a bound on the total wait time even though the _lwp_cond_timedwait() may return several times due to the condition being signalled or the wait being interrupted. Example 3: Use the _lwp_cond_reltimedwait() function in a loop testing some condition. The _lwp_cond_reltimedwait() function is also normally used in a loop testing some condition. It uses a relative timeout value as follows: timestruc_t to; lwp_mutex_t m; lwp_cond_t cv; int cond, err; (void) _lwp_mutex_lock(&m); while (cond == FALSE) { to.tv_sec = TIMEOUT; to.tv_nsec = 0; err = _lwp_cond_reltimedwait(&cv, &m, &to); if (err == ETIME) { /* timeout, do something */ break; } } (void) _lwp_mutex_unlock(&m); SEE ALSO
_lwp_cond_broadcast(2), _lwp_cond_signal(2), _lwp_kill(2), _lwp_mutex_lock(2), fork(2), kill(2) SunOS 5.10 13 Apr 2001 _lwp_cond_wait(2)
All times are GMT -4. The time now is 10:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy