pause() isn't a system call on FreeBSD; use sigsuspend(2) instead.

MFC after:	1 week
This commit is contained in:
markj 2015-01-30 05:14:01 +00:00
parent 9b9b961a04
commit b55f153573

View File

@ -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*");