The final else part in your code will execute for the condition, when flag is not equal to -1, so this code is executed for the two conditions like when flag value is zero and when the flag value is pid of child.
In order to avoid this ...
I desperately wanted one of the UNIX Gurus to help me resolve my problem asap(I have to deliver the code to the client by Monday 08-oct).
I have a file with around 5 million records (50 lakhs). Now my original process was taking around 30 hours to read the complete file, process each and every... (4 Replies)
One more question. How can i calculate the time that system needs to make fork() system call? I need to make it with times function but i really don't know how. :( (2 Replies)
Can anyone explain me what really happens when a system call fork() is called ?
I like to know what happens internally.
Thanks in Advance.
- Arun (1 Reply)
Hi folks,
I want to know how this below program works?
#include <stdio.h>
int main()
{
printf("A\n");
fork();
printf("B\n");
fork();
fork();
printf("D\n");
fork();
printf("C\n");
}
This is just for example. How this type of programs where fork is used many places, how the... (1 Reply)
Hi all,
I am having a problem with user defined function call. I am new into the concept of shell script UDFs.
My function is:
iterate_directory()
{
cd $1
k=0
for i in *
do
if
then
ARR=${i}
fi
done
echo ${ARR
}
} (4 Replies)
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:
i have a problem in understanding the behaviour of fork .
i understood fork as to create a new process and... (4 Replies)
hi,
i tried the following source codes:
fork1.c:
main()
{
printf("demo of fork\n");
fork();
printf("hello");
}
output:
demo of fork
hello hello
fork2.c:
main()
{
printf("demo of fork"); (0 Replies)
hi all,
i tried the following source codes:
fork1.c:
main()
{
printf("demo of fork\n");
fork();
printf("hello");
}
output:
demo of fork
hello hello
fork2.c:
main() (3 Replies)
Hi, I'm writing a shell script where I want to call fork(). However I wrote like this "var=fork()" in c style and got this error:
"syntax error near unexpected token `(' "
How could I call fork() in shell script? Thanks in advance.
Duplicate Post - Continue Here - Please Do Not Cross Post... (0 Replies)
Hi, I'm writing a shell script where I want to call fork(). However I wrote like this "var=fork()" in c style and got this error:
"syntax error near unexpected token `(' "
How could I call fork() in shell script? Thanks in advance. (2 Replies)
Discussion started by: Xiaoya
2 Replies
LEARN ABOUT DEBIAN
glgeterror
GLGETERROR(3G) [FIXME: manual] GLGETERROR(3G)NAME
glGetError - return error information
C SPECIFICATION
GLenum glGetError(void);
DESCRIPTION
glGetError returns the value of the error flag. Each detectable error is assigned a numeric code and symbolic name. When an error occurs,
the error flag is set to the appropriate error code value. No other errors are recorded until glGetError is called, the error code is
returned, and the flag is reset to GL_NO_ERROR. If a call to glGetError returns GL_NO_ERROR, there has been no detectable error since the
last call to glGetError, or since the GL was initialized.
To allow for distributed implementations, there may be several error flags. If any single error flag has recorded an error, the value of
that flag is returned and that flag is reset to GL_NO_ERROR when glGetError is called. If more than one flag has recorded an error,
glGetError returns and clears an arbitrary error flag value. Thus, glGetError should always be called in a loop, until it returns
GL_NO_ERROR, if all error flags are to be reset.
Initially, all error flags are set to GL_NO_ERROR.
The following errors are currently defined:
GL_NO_ERROR
No error has been recorded. The value of this symbolic constant is guaranteed to be 0.
GL_INVALID_ENUM
An unacceptable value is specified for an enumerated argument. The offending command is ignored and has no other side effect than to
set the error flag.
GL_INVALID_VALUE
A numeric argument is out of range. The offending command is ignored and has no other side effect than to set the error flag.
GL_INVALID_OPERATION
The specified operation is not allowed in the current state. The offending command is ignored and has no other side effect than to set
the error flag.
GL_INVALID_FRAMEBUFFER_OPERATION
The framebuffer object is not complete. The offending command is ignored and has no other side effect than to set the error flag.
GL_OUT_OF_MEMORY
There is not enough memory left to execute the command. The state of the GL is undefined, except for the state of the error flags,
after this error is recorded.
When an error flag is set, results of a GL operation are undefined only if GL_OUT_OF_MEMORY has occurred. In all other cases, the command
generating the error is ignored and has no effect on the GL state or frame buffer contents. If the generating command returns a value, it
returns 0. If glGetError itself generates an error, it returns 0.
COPYRIGHT
Copyright (C) 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see
http://oss.sgi.com/projects/FreeB/.
[FIXME: source] 05/30/2012 GLGETERROR(3G)