From: "Nick S. Grechukh" <ngrechukh@ua.fm>
To: community@altlinux.ru
Subject: Re: [COMM] кошерный запуск процесса
Date: Thu, 10 Feb 2005 15:11:23 +0200
Message-ID: <200502101511.28819.ngrechukh@ua.fm> (raw)
In-Reply-To: <420B59F3.4060902@ricom.ru>
[-- Attachment #1: Type: text/plain, Size: 710 bytes --]
On Thursday 10 February 2005 14:56, Alexey Morsov wrote:
> Eugene.Ostapets@Kvazar-Micro.com wrote:
> > Хм... А сколько строк в программе? :)
> > fork добавит 3 строки
> > setreuid, seregid, chroot добавят по строке... Если сделать обработку
> > ключей командной строки - то это еще строк 10...
>
> Вы серьезно? Ну тогда надо попробовать...
> А кстати - есть стандартная библиотека на Си для обработки параметров ?
есть, glibc например ;-)
int main(int argc, char *argv[], char *envp[]);
argc - количество слов в командной строке.
argv массив указателей на отдельные слова.
myprog 12 abcd
argc == 3,
argv[0] будет указывать на имя программы "myprog",
argv[1] - на слово "12",
argv[2] - на слово "abcd".
[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]
next prev parent reply other threads:[~2005-02-10 13:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-10 12:46 Eugene.Ostapets
2005-02-10 12:56 ` Alexey Morsov
2005-02-10 13:11 ` Nick S. Grechukh [this message]
2005-02-10 13:19 ` Alexey Morsov
2005-02-10 13:26 ` Nick S. Grechukh
2005-02-10 13:32 ` Alexey Morsov
2005-02-10 13:12 ` Ender
2005-02-10 16:29 ` [Comm] " Arioch
2005-02-11 9:58 ` [COMM] " Grigory Milev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200502101511.28819.ngrechukh@ua.fm \
--to=ngrechukh@ua.fm \
--cc=community@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git