version 1.7, 1999/10/04 21:17:32 |
version 1.8, 2001/11/17 19:50:53 |
|
|
#include <err.h> |
#include <err.h> |
#include <errno.h> |
#include <errno.h> |
#include <fts.h> |
#include <fts.h> |
|
#include <signal.h> |
#include <stdio.h> |
#include <stdio.h> |
#include <string.h> |
#include <string.h> |
#include <stdlib.h> |
#include <stdlib.h> |
|
|
PLAN *plan; /* search plan */ |
PLAN *plan; /* search plan */ |
char **paths; /* array of pathnames to traverse */ |
char **paths; /* array of pathnames to traverse */ |
{ |
{ |
|
sigset_t fullset, oset; |
PLAN *p; |
PLAN *p; |
|
|
if (!(tree = fts_open(paths, ftsoptions, NULL))) |
if (!(tree = fts_open(paths, ftsoptions, NULL))) |
err(1, "ftsopen"); |
err(1, "ftsopen"); |
|
|
while ((entry = fts_read(tree))) { |
sigfillset(&fullset); |
|
for (;;) { |
|
(void)sigprocmask(SIG_BLOCK, &fullset, &oset); |
|
entry = fts_read(tree); |
|
(void)sigprocmask(SIG_SETMASK, &oset, NULL); |
|
if (entry == NULL) |
|
break; |
|
|
switch (entry->fts_info) { |
switch (entry->fts_info) { |
case FTS_D: |
case FTS_D: |
if (isdepth) |
if (isdepth) |