11 May 2019, 13:26 | #2161 |
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?
|
11 May 2019, 13:36 | #2162 |
Ancient User
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. |
11 May 2019, 13:42 | #2163 |
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.
|
11 May 2019, 19:09 | #2164 |
Registered User
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.
|
11 May 2019, 23:53 | #2165 |
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. |
11 May 2019, 23:58 | #2166 |
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 |
12 May 2019, 00:27 | #2167 |
Registered User
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. |
12 May 2019, 08:17 | #2168 |
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. |
12 May 2019, 17:32 | #2169 |
Ancient User
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). |
12 May 2019, 20:51 | #2170 | |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,216
|
Quote:
The workbench, however, detaches programs by itself - unlike the shell, which runs programs as part of its own process. |
|
12 May 2019, 20:54 | #2171 |
Puttymoon inhabitant
|
Q: What the NIL: stands for? Is it an abbreviation?
|
12 May 2019, 21:03 | #2172 |
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. |
12 May 2019, 21:34 | #2173 |
Registered User
Join Date: Mar 2004
Location: finland
Posts: 1,837
|
Originally from Latin. Nil = nothing, zero.
|
13 May 2019, 16:32 | #2174 |
Ancient User
Join Date: Apr 2007
Location: GREECE
Age: 50
Posts: 757
|
Nil = null
|
13 May 2019, 19:10 | #2175 | |
Registered User
Join Date: Aug 2016
Location: Ohio
Posts: 185
|
Quote:
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) |
|
13 May 2019, 19:42 | #2176 |
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?
|
14 May 2019, 03:22 | #2177 | |
Registered User
Join Date: Jul 2010
Location: Utah, USA
Posts: 516
|
Quote:
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. |
|
16 May 2019, 16:12 | #2178 |
Registered User
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 ] |
16 May 2019, 16:32 | #2179 |
Ancient User
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) |
16 May 2019, 23:08 | #2180 |
Registered User
Join Date: Apr 2015
Location: Spain
Posts: 511
|
|
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 |
|
|