a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 dos.library
  AbortPkt
  AddBuffers
  AddDosEntry
  AddPart
  AddSegment
  AllocDosObject
  AssignAdd
  AssignLate
  AssignLock
  AssignPath
  AttemptLockDosList
  ChangeMode
  CheckSignal
  Cli
  CliInitNewcli
  CliInitRun
  Close
  CompareDates
  CreateDir
  CreateNewProc
  CreateProc
  CurrentDir
  DateStamp
  DateToStr
  Delay
  DeleteFile
  DeleteVar
  DeviceProc
  DoPkt
  DupLock
  DupLockFromFH
  EndNotify
  ErrorReport
  ExAll
  ExAllEnd
  ExNext
  Examine
  ExamineFH
  Execute
  Exit
  FGetC
  FGets
  FPutC
  FPuts
  FRead
  FWrite
  Fault
  FilePart
  FindArg
  FindCliProc
  FindDosEntry
  FindSegment
  FindVar
  Flush
  Format
  FreeArgs
  FreeDeviceProc
  FreeDosEntry
  FreeDosObject
  GetArgStr
  GetConsoleTask
  GetCurrentDirName
  GetDeviceProc
  GetFileSysTask
  GetProgramDir
  GetProgramName
  GetPrompt
  GetVar
  Info
  Inhibit
  Input
  InternalLoadSeg
  InternalUnLoadSeg
  IoErr
  IsFileSystem
  IsInteractive
  LoadSeg
  Lock
  LockDosList
  LockRecord
  LockRecords
  MakeDosEntry
  MakeLink
  MatchEnd
  MatchFirst
  MatchNext
  MatchPattern
  MatchPatternNoCase
  MaxCli
  NameFromFH
  NameFromLock
  NewLoadSeg
  NextDosEntry
  Open
  OpenFromLock
  Output
  ParentDir
  ParentOfFH
  ParsePattern
  ParsePatternNoCase
  PathPart
  PrintFault
  PutStr
  Read
  ReadArgs
  ReadItem
  ReadLink
  Relabel
  RemAssignList
  RemDosEntry
  RemSegment
  Rename
  ReplyPkt
  RunCommand
  SameDevice
  SameLock
  Seek
  SelectInput
  SelectOutput
  SendPkt
  SetArgStr
  SetComment
  SetConsoleTask
  SetCurrentDirName
  SetFileDate
  SetFileSize
  SetFileSysTask
  SetIoErr
  SetMode
  SetOwner
  SetProgramDir
  SetProgramName
  SetPrompt
  SetProtection
  SetVBuf
  SetVar
  SplitName
  StartNotify
  StrToDate
  StrToLong
  SystemTagList
  UnGetC
  UnLoadSeg
  UnLock
  UnLockDosList
  UnLockRecord
  UnLockRecords
  VFPrintf
  VFWritef
  VPrintf
  WaitForChar
  WaitPkt
  Write
  WriteChars
Include
GuruMeditation
Docs » Autodocs » dos.library » SystemTagList

NAME

	SystemTagList -- Have a shell execute a command line (V36)

SYNOPSIS

	error = SystemTagList(command, tags)
D0 D1 D2
LONG SystemTagList(STRPTR, struct TagItem *)
error = System(command, tags)
D0 D1 D2
LONG System(STRPTR, struct TagItem *)
error = SystemTags(command, Tag1, ...)
LONG SystemTags(STRPTR, ULONG, ...)

FUNCTION

	Similar to Execute(), but does not read commands from the input
filehandle. Spawns a Shell process to execute the command, and
returns the returncode the command produced, or -1 if the command
could not be run for any reason. The input and output filehandles
will not be closed by System, you must close them (if needed) after
System returns, if you specified them via SYS_Input or SYS_Output.
By default the new process will use your current Input() and Output()
filehandles. Normal Shell command-line parsing will be done
including redirection on 'command'. The current directory and path
will be inherited from your process. Your path will be used to find
the command (if no path is specified).
Note that you may NOT pass the same filehandle for both SYS_Input
and SYS_Output. If you want input and output to both be to the same
CON: window, pass a SYS_Input of a filehandle on the CON: window,
and pass a SYS_Output of NULL. The shell will automatically set
the default Output() stream to the window you passed via SYS_Input,
by opening "*" on that handler.
If used with the SYS_Asynch flag, it WILL close both it's input and
output filehandles after running the command (even if these were
your Input() and Output()!)
Normally uses the boot (ROM) shell, but other shells can be specified
via SYS_UserShell and SYS_CustomShell. Normally, you should send
things written by the user to the UserShell. The UserShell defaults
to the same shell as the boot shell.
The tags are passed through to CreateNewProc() (tags that conflict
with SystemTagList() will be filtered out). This allows setting
things like priority, etc for the new process. The tags that are
currently filtered out are:
NP_Seglist
NP_FreeSeglist
NP_Entry
NP_Input
NP_Output
NP_CloseInput
NP_CloseOutput
NP_HomeDir
NP_Cli

INPUTS

	command - Program and arguments
tags - see <dos/dostags.h>. Note that both SystemTagList()-
specific tags and tags from CreateNewProc() may be passed.

RESULT

	error	- 0 for success, result from command, or -1.  Note that on
error, the caller is responsible for any filehandles or other
things passed in via tags. -1 will only be returned if
dos could not create the new shell. If the command is not
found the shell will return an error value, normally
RETURN_ERROR.

SEE ALSO

Execute(), CreateNewProc(), <dos/dostags.h>, Input(), Output()

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Defjam

FLT
KEF
SCX
DJ

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se