English Amiga Board


Go Back   English Amiga Board > Main > Nostalgia & memories

 
 
Thread Tools
Old 11 May 2019, 13:26   #2161
jizmo
Registered Abuser
 
Join Date: Oct 2013
Location: Valencia / Spain
Posts: 361
Given that Amiga multitasks by default, why do most Amiga programs completely halt command lines unless executed with a 'RUN' command?
jizmo is offline  
Old 11 May 2019, 13:36   #2162
NLS
Ancient User
 
NLS's Avatar
 
Join Date: Apr 2007
Location: GREECE
Age: 50
Posts: 757
Why is one related to the other?
The "process" opened by the specific window is used by the command.
For a program to open a new process is the dev's choice (and not something enforced by Commodore guidelines IIRC).
As you already said using "run" is enough, or opening a new shell before running something in the first.

A multi-tasking OS doesn't mean the shell is multi-tasking. You can have many, or explicitly send commands to other process. It also has to do with the I/O. If a command needs to "capture" the I/O (without opening a window), it is much cleaner to just use own shell's I/O.
Linux is multi-tasking and is the same. Many commands take over the shell and you need to explicitly push them in the background.
NLS is offline  
Old 11 May 2019, 13:42   #2163
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 3,303
It depends, I think. If you want serialisation or parallelisation. In scripts for example normally you want to wait for a command finished or get the result. If you are in the Shell and type commands you can choose (run or not) what you prefer.
daxb is offline  
Old 11 May 2019, 19:09   #2164
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
It's pretty reasonable for a command to halt the shell by default. After all, what good is being able to run a second command when the previous command is listing off its output? And would you want the two output streams mixed together? Or leave the second one until the first is finished? You can already enter another command while the first one is running, and it will be executed as soon as the first one is finished. So you can queue up commands without needing to write a script.
Daedalus is offline  
Old 11 May 2019, 23:53   #2165
jizmo
Registered Abuser
 
Join Date: Oct 2013
Location: Valencia / Spain
Posts: 361
I guess I did not word my question right. The shell running multiple programs outputting text would not obviously make much sense.

I was referring to using command line to launching non-cli programs that open up in separate windows or screens: Sometimes they release the shell right after the program has opened, but more often the shell is locked until the user exits the program, effectively meaning one should always execute them using a 'RUN' command just to be on the safe side.

If the program does not use the command line, but open up in a window instead, why does it need to halt the CLI by default? And how do some programs prevent this, do they send some exit flag to the shell after they've started up?

Last edited by jizmo; 11 May 2019 at 23:58.
jizmo is offline  
Old 11 May 2019, 23:58   #2166
MartinW
Registered User
 
Join Date: Mar 2017
Location: Minehead / UK
Posts: 608
It isn't really halting anything. The shell starts a second process which is spawned by the process in which the shell is running. That's busy until such time as the GUI based software has finished so the shell appears to be locked. It's not really, it just hasn't finished the task you asked it to do. Hence, if you "run" the new process you're detaching from the original process.

I'm probably not explaining myself well
MartinW is offline  
Old 12 May 2019, 00:27   #2167
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
Yeah, that's the default because, at the time of launching, the Shell doesn't know whether it's a program that needs to output text to the Shell window or not. You're right, of course, that a program shouldn't need to tie up the Shell like that if it doesn't need to, but that's not a decision the Shell can make - after all, there are programs out there that have a GUI while also outputting to the console window.

It's up to the program to detach itself from the Shell, which is possible but is extra code. I guess most programmers simply aren't bothered enough to add that functionality, especially if they mainly intended their program to be run from the Workbench anyway.
Daedalus is offline  
Old 12 May 2019, 08:17   #2168
jizmo
Registered Abuser
 
Join Date: Oct 2013
Location: Valencia / Spain
Posts: 361
Thanks for the answers – I've been always wondering why this behaviour was so random.

Sounds like it could've been fixed with some sort of file flag that tells the program to detach itself from Shell if run from there. But I guess us command line users were never a high priority for Commodore for whom CLI existed mostly to just run the scripts.

Last edited by jizmo; 12 May 2019 at 08:34.
jizmo is offline  
Old 12 May 2019, 17:32   #2169
NLS
Ancient User
 
NLS's Avatar
 
Join Date: Apr 2007
Location: GREECE
Age: 50
Posts: 757
Well that's a bit unfair for Commodore and CLI.
It works as intended - then programmers needed to abide and didn't always.
CLI when first released was way better than the then version of MS-DOS and much closer to UNIX (sans-multi-user).
NLS is offline  
Old 12 May 2019, 20:51   #2170
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,216
Quote:
Originally Posted by jizmo View Post
If the program does not use the command line, but open up in a window instead, why does it need to halt the CLI by default? And how do some programs prevent this, do they send some exit flag to the shell after they've started up?
The answer is as simple as it could be: Because without taking any other action, this is how the shell and the workbench behave. A program needs to include additional logic to detach from shell. Otherwise, the program "overloads" the shell process, until it returns to the shell.

The workbench, however, detaches programs by itself - unlike the shell, which runs programs as part of its own process.
Thomas Richter is offline  
Old 12 May 2019, 20:54   #2171
Predseda
Puttymoon inhabitant
 
Predseda's Avatar
 
Join Date: Mar 2007
Location: Tromaville
Age: 46
Posts: 7,539
Send a message via ICQ to Predseda
Q: What the NIL: stands for? Is it an abbreviation?
Predseda is offline  
Old 12 May 2019, 21:03   #2172
kolla
Banned
 
Join Date: Nov 2007
Location: Trondheim, Norway
Posts: 1,893
Amiga questions you've always been too embarrassed to ask

https://en.wikipedia.org/wiki/0

Amiga/TRIPOS NIL: is equivalent to unix /dev/null, a device that swallows anything you send to it.
kolla is offline  
Old 12 May 2019, 21:34   #2173
zipper
Registered User
 
Join Date: Mar 2004
Location: finland
Posts: 1,837
Originally from Latin. Nil = nothing, zero.
zipper is offline  
Old 13 May 2019, 16:32   #2174
NLS
Ancient User
 
NLS's Avatar
 
Join Date: Apr 2007
Location: GREECE
Age: 50
Posts: 757
Nil = null
NLS is offline  
Old 13 May 2019, 19:10   #2175
EugeneNine
Registered User
 
Join Date: Aug 2016
Location: Ohio
Posts: 185
Quote:
Originally Posted by jizmo View Post
I guess I did not word my question right. The shell running multiple programs outputting text would not obviously make much sense.

I was referring to using command line to launching non-cli programs that open up in separate windows or screens: Sometimes they release the shell right after the program has opened, but more often the shell is locked until the user exits the program, effectively meaning one should always execute them using a 'RUN' command just to be on the safe side.

If the program does not use the command line, but open up in a window instead, why does it need to halt the CLI by default? And how do some programs prevent this, do they send some exit flag to the shell after they've started up?
It only halts that instance of the CLI, you can open additional CLI's to run other programs in those instances.
I bet the reason some gui programs let the cli you launched them from is because they installed a simple script that 'RUN's them. The default behavior is that program runs in that cli (and therefore takes it over) unless you tell it to run separate via a 'RUN' (or & in Li/Unix)
EugeneNine is offline  
Old 13 May 2019, 19:42   #2176
EugeneNine
Registered User
 
Join Date: Aug 2016
Location: Ohio
Posts: 185
So my search-fu apparently is weak, is there a serial number decoder anywhere that maybe tells things like date built, etc?
EugeneNine is offline  
Old 14 May 2019, 03:22   #2177
slaapliedje
Registered User
 
slaapliedje's Avatar
 
Join Date: Jul 2010
Location: Utah, USA
Posts: 516
Quote:
Originally Posted by EugeneNine View Post
So my search-fu apparently is weak, is there a serial number decoder anywhere that maybe tells things like date built, etc?
Pretty sure there is one for most Atari systems. Thought there might be for the Amiga. Usually it was based on the week of the year and batch number for some Atari systems.


I will follow with a new question. Does anyone else's AmigaOS 4.1 FE for Classic make your CDROM sound like it is trying to turn a vinyl album into afloppy drive? It just starts to make mine scream. No other disks I have put in it does that.
slaapliedje is offline  
Old 16 May 2019, 16:12   #2178
Estrayk
Registered User
 
Estrayk's Avatar
 
Join Date: Apr 2015
Location: Spain
Posts: 511
QUESTION:

I have always wondered how it is possible that the old photogenics could manipulate HAM8 images without HAM-artifacts. What kind of witchcraft was that?

Video from my real Amiga A1200:

[ Show youtube player ]
Estrayk is offline  
Old 16 May 2019, 16:32   #2179
NLS
Ancient User
 
NLS's Avatar
 
Join Date: Apr 2007
Location: GREECE
Age: 50
Posts: 757
Is it HAM? Or is 256 color mode?

(also IIRC HAM8 produces less distinct artifacts than HAM6)
NLS is offline  
Old 16 May 2019, 23:08   #2180
Estrayk
Registered User
 
Estrayk's Avatar
 
Join Date: Apr 2015
Location: Spain
Posts: 511
Quote:
Originally Posted by nls View Post
is it ham? Or is 256 color mode?
ham8
Estrayk is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Gamebase Amiga - 2 Questions Fiery Phoenix New to Emulation or Amiga scene 8 13 August 2012 12:31
Amiga CD32 questions pubzombie New to Emulation or Amiga scene 26 24 January 2010 16:27
A few general Amiga questions. Hougham support.Hardware 6 30 April 2008 22:13
Amiga A4000 Questions mfletcher support.Hardware 8 29 April 2008 10:51
Amiga 600 Questions JDunlap support.Hardware 14 20 January 2008 19:13

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 18:37.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.48009 seconds with 16 queries