Hello,
I have noticed very strange bahaviour of sleep() function.
Here are two examples:
/* Ex1 */
#include <unistd.h>
int main()
{
printf("something1");
sleep(1);
printf("something2");
return 0;
}
/* Ex2 */
#include <unistd.h>
int main()
{
printf("something1\n");
sleep(1);
printf("something2\n");
return 0;
}
Could you please expalin me the differences between given examples, except
new lines \n in printf().
The "bug" is that in Ex1 both strings are printed AFTER the sleep time.
The examples were compiled and tested under Slackware 7.1 gcc-2.95.2
Reagrds,
Milina Giuzleva
Visit A Line Internet Clubs - po-dobrite clubove!!!
_______________________________________________
Bug-sh-utils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-sh-utils