#include <stdlib.h> /* for malloc */
#include <ctype.h> /* for isprint */
#include <unistd.h> /* for fork/exec */
+#include <sys/types.h> /* for wait */
+#include <sys/wait.h> /* for wait */
#define __USE_GNU
#include <string.h> /* for making strcasestr happy */
return ( NULL );
}
-void pnd_get_mountpoint ( char *unique_id, char *r_mountpoint, unsigned int mountpoint_len ) {
-
- if ( ! r_mountpoint ) {
- return; // sillyness
- }
-
- snprintf ( r_mountpoint, mountpoint_len, "%s/%s", PND_MOUNT_PATH, unique_id );
-
- return;
-}
-
static unsigned char pnd_pnd_mountie ( char *pndrun, char *fullpath, char *unique_id, unsigned char do_mount ) {
char *argv [ 20 ];
int f;
execv ( pndrun, argv );
}
+ // wait until mountscript actually completes
+ int status = 0;
+ wait ( &status );
+
return ( 1 );
}