Browse Source

carp process: reading and writing works for one iteration

master
Veit Heller 5 months ago
parent
commit
17ca848344
14 changed files with 54 additions and 3 deletions
  1. +1
    -0
      Pond.package/CarpException.class/README.md
  2. +3
    -0
      Pond.package/CarpException.class/instance/defaultAction.st
  3. +3
    -0
      Pond.package/CarpException.class/instance/from..st
  4. +14
    -0
      Pond.package/CarpException.class/properties.json
  5. +3
    -0
      Pond.package/CarpProcess.class/instance/died.st
  6. +5
    -1
      Pond.package/CarpProcess.class/instance/initialize.st
  7. +3
    -0
      Pond.package/CarpProcess.class/instance/isRunning.st
  8. +3
    -0
      Pond.package/CarpProcess.class/instance/receiveErrorString.st
  9. +3
    -0
      Pond.package/CarpProcess.class/instance/receiveString.st
  10. +3
    -0
      Pond.package/CarpProcess.class/instance/run.st
  11. +5
    -0
      Pond.package/CarpProcess.class/instance/sendString..st
  12. +1
    -1
      Pond.package/CarpProcess.class/instance/setCarp..st
  13. +3
    -0
      Pond.package/CarpProcess.class/instance/setDir..st
  14. +4
    -1
      Pond.package/CarpProcess.class/properties.json

+ 1
- 0
Pond.package/CarpException.class/README.md View File

@@ -0,0 +1 @@
I’m an exception that gets thrown when Carp does something funky.

+ 3
- 0
Pond.package/CarpException.class/instance/defaultAction.st View File

@@ -0,0 +1,3 @@
accessing
defaultAction
UnhandledError signalForException: self

+ 3
- 0
Pond.package/CarpException.class/instance/from..st View File

@@ -0,0 +1,3 @@
instance creation
from: anError
error := anError

+ 14
- 0
Pond.package/CarpException.class/properties.json View File

@@ -0,0 +1,14 @@
{
"commentStamp" : "VeitHeller 12/14/2019 17:49",
"super" : "Exception",
"category" : "Pond",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
"parent",
"error"
],
"name" : "CarpException",
"type" : "normal"
}

+ 3
- 0
Pond.package/CarpProcess.class/instance/died.st View File

@@ -0,0 +1,3 @@
accessing
died
^ excepted isNotNil

+ 5
- 1
Pond.package/CarpProcess.class/instance/initialize.st View File

@@ -1,3 +1,7 @@
initialization
initialize
proc := OSProcess command: 'carp'
proc := OSSUnixSubprocess new command: 'carp';
redirectStdin;
redirectStdout;
redirectStderr;
addAllEnvVariablesFromParentWithoutOverride

+ 3
- 0
Pond.package/CarpProcess.class/instance/isRunning.st View File

@@ -0,0 +1,3 @@
accessing
isRunning
^ self died not and: proc pid; and: proc exitStatus isNil

+ 3
- 0
Pond.package/CarpProcess.class/instance/receiveErrorString.st View File

@@ -0,0 +1,3 @@
accessing
receiveErrorString
^ proc stderrStream upToEnd

+ 3
- 0
Pond.package/CarpProcess.class/instance/receiveString.st View File

@@ -0,0 +1,3 @@
accessing
receiveString
^ proc stdoutStream upToEnd

+ 3
- 0
Pond.package/CarpProcess.class/instance/run.st View File

@@ -0,0 +1,3 @@
accessing
run
[ [ proc run ] on: Error do: [ :err | excepted := err ] ] fork

+ 5
- 0
Pond.package/CarpProcess.class/instance/sendString..st View File

@@ -0,0 +1,5 @@
accessing
sendString: aString
proc stdinStream nextPutAll: aString.
proc stdinStream close.
proc redirectStdin

+ 1
- 1
Pond.package/CarpProcess.class/instance/setCarp..st View File

@@ -1,3 +1,3 @@
accessing
setCarp: aString
proc := OSProcess command: aString
proc command: aString

+ 3
- 0
Pond.package/CarpProcess.class/instance/setDir..st View File

@@ -0,0 +1,3 @@
accessing
setDir: aString
proc environmentAt: 'CARP_DIR' put: aString

+ 4
- 1
Pond.package/CarpProcess.class/properties.json View File

@@ -6,7 +6,10 @@
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
"proc"
"proc",
"out",
"in",
"excepted"
],
"name" : "CarpProcess",
"type" : "normal"

Loading…
Cancel
Save