diff options
author | markj <markj@FreeBSD.org> | 2015-01-30 05:14:01 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2015-01-30 05:14:01 +0000 |
commit | b55f1535733c70849d7a3b4eddc4ad91c884db86 (patch) | |
tree | ebb0a90b769b6bf6b1bff75652ecefe2defad63c /cddl/contrib/opensolaris/cmd/dtrace | |
parent | 9b9b961a046af6aaafd24a4af37b236c949c1d1f (diff) | |
download | FreeBSD-src-b55f1535733c70849d7a3b4eddc4ad91c884db86.zip FreeBSD-src-b55f1535733c70849d7a3b4eddc4ad91c884db86.tar.gz |
pause() isn't a system call on FreeBSD; use sigsuspend(2) instead.
MFC after: 1 week
Diffstat (limited to 'cddl/contrib/opensolaris/cmd/dtrace')
-rw-r--r-- | cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.dlclose1.ksh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.dlclose1.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.dlclose1.ksh index 1c155fe..e230b11 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.dlclose1.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.dlclose1.ksh @@ -106,11 +106,13 @@ cat > main.c <<EOF #include <dlfcn.h> #include <unistd.h> #include <stdio.h> +#include <signal.h> int main(int argc, char **argv) { void *live; + sigset_t mask; if ((live = dlopen("./livelib.so", RTLD_LAZY | RTLD_LOCAL)) == NULL) { printf("dlopen of livelib.so failed: %s\n", dlerror()); @@ -119,7 +121,8 @@ main(int argc, char **argv) (void) dlclose(live); - pause(); + (void) sigemptyset(&mask); + (void) sigsuspend(&mask); return (0); } @@ -133,7 +136,7 @@ fi script() { $dtrace -w -x bufsize=1k -c ./main -qs /dev/stdin <<EOF - syscall::pause:entry + syscall::sigsuspend:entry /pid == \$target/ { system("$dtrace -l -P test_prov*"); |