From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: solaris daemon question
Date: 1999/07/28
Date: 1999-07-28T00:00:00+00:00 [thread overview]
Message-ID: <7nmqu7$lgu@hobbes.crc.com> (raw)
In-Reply-To: 7nl2l8$cg9$1@Usenet.Logical.NET
darren wilson wrote in message <7nl2l8$cg9$1@Usenet.Logical.NET>...
>I'm trying to write a simple daemon to run on a Sun E3500 running solaris
>2.6. Can anyone tell me how to issue command line unix statements such as
>mv or cp and such from within an ada program? I've been programming in
>ada for a while, but have never done this. Any help is appreciated.
>
Here's an interface to the "system" C library function:
with Ada.Characters.Latin_1;
with System;
function Execute_Shell_Command
(The_Command : String) return Integer is
function Execute
(The_Command_Address : System.Address) return Integer;
pragma Import (C, Execute, "system");
The_Nul_Terminated_Command_String : constant String :=
The_Command & Ada.Characters.Latin_1.Nul;
begin
return Execute (The_Nul_Terminated_Command_String'Address);
end Execute_Shell_Command;
prev parent reply other threads:[~1999-07-28 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-07-27 0:00 solaris daemon question darren wilson
1999-07-28 0:00 ` David C. Hoos, Sr. [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox