koryw has asked for the wisdom of the Perl Monks concerning the following question:
The C wrapper and everything else works fine, but I want to be able to check the syntax of the two agruments in C, before they are passed to the perl script, and I'm not sure how to do that.
Here's my C wrapper* * ldap-group.c by Kory Wheatley * Idaho State University * September 29, 2003 * This is an suid wrapper for the ldapgroup program. */ #include <stdio.h> #include <string.h> #include <unistd.h> /* for exec */ main(argc, argv) int argc; char *argv []; { /* Make sure at least one argument is passed to this program */ if (argc < 2) { printf ("Usage: ldap-group [-p] trans \n"); exit(1); } /* execute the perl script */ execv("/opt/bin/techweb-changes.pl",argv); } /* END OF MAIN PROGRAM */
edited: Mon Sep 29 22:37:22 2003 by jeffa - code tags, p tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: passing c agruments to Perl
by tachyon (Chancellor) on Sep 30, 2003 at 00:32 UTC | |
by koryw (Novice) on Sep 30, 2003 at 18:53 UTC | |
by tachyon (Chancellor) on Oct 01, 2003 at 01:14 UTC | |
|
Re: passing c agruments to Perl
by BUU (Prior) on Sep 29, 2003 at 22:44 UTC | |
by koryw (Novice) on Sep 30, 2003 at 14:45 UTC | |
by tilly (Archbishop) on Oct 05, 2003 at 01:29 UTC |