Re: clone testcases in LTP

From: Andreas Schwab <schwab_at_suse.de>
Date: 2003-07-11 19:57:30
Peter Chubb <peter@chubb.wattle.id.au> writes:

|> >>>>> "David" == David Mosberger <davidm@napali.hpl.hp.com> writes:
|> 
|> >>>>> On Thu, 10 Jul 2003 11:18:38 -0500, Nathan Straz <nstraz@sgi.com> said:
|> >>> /* int __clone2(int (*fn) (void *arg), void *child_stack_base, */
|> >>> /* size_t child_stack_size, int flags, void *arg, */ /* pid_t
|> >>> *parent_tid, void *tls, pid_t *child_tid) */
|> 
|> I'm not finding that clone2() works -- We get a segfault in the cloned
|> process when it returns.
|> 
|> This is the program:
|> 
|> #include <stdio.h>
|> #include <sys/wait.h>
|> #include <unistd.h>
|> #include <sys/types.h>
|> #include <stdlib.h>
|> 
|> int func(void *arg) { 
|>     fprintf(stderr, "In child\n"); 
|>     return 0;
|> } 

You can't return from the function, only exit() or _exit() works.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Fri Jul 11 05:57:37 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:16 EST