Skip to content

Commit 5db0f39

Browse files
committed
.gitignore and .gitattributes ... change bin/startSmalltalkServer to be gemstone3.x friendly with ideas from bin/startSmalltalkServer31
1 parent b68cb92 commit 5db0f39

File tree

4 files changed

+45
-83
lines changed

4 files changed

+45
-83
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[._]*.s[a-w][a-z]
2+
[._]s[a-w][a-z]
3+
*.un~
4+
Session.vim
5+
.netrwhist
6+
*~

bin/runSmalltalkServer31

-68
This file was deleted.

bin/startSmalltalkServer

+36-15
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
#!/bin/bash
2+
#
3+
# ./startSmalltalkServer31 runs a server Gem
4+
# - first argument is the name of the server class that will be looked up in Gemstone to startthe server
5+
# - second argument is a port number
6+
#
7+
ServerClass=$1
8+
ServerPort=$2
9+
210

311
if [ -s $GEMSTONE/seaside/etc/gemstone.secret ]; then
412
. $GEMSTONE/seaside/etc/gemstone.secret
@@ -13,7 +21,13 @@ if [ "a$1" = "a" ]; then
1321
exit 1
1422
fi
1523

16-
cat << EOF | nohup $GEMSTONE/bin/topaz -l -T50000 2>&1 >> $GEMSTONE_LOGDIR/${1}_server-${2}.log &
24+
# Requires a port number as a parameter
25+
if [ "a$2" = "a" ]; then
26+
echo 'Missing argument <server port number>'
27+
exit 1
28+
fi
29+
30+
cat << EOF | nohup $GEMSTONE/bin/topaz -l -e $GEMSTONE/seaside/etc/seaside30.conf 2>&1 >> $GEMSTONE_LOGDIR/${1}_server-${2}.log &
1731
1832
set user DataCurator pass $GEMSTONE_CURATOR_PASS gems $GEMSTONE_NAME
1933
@@ -40,21 +54,24 @@ System commitTransaction
4054
%
4155
4256
run
43-
| count |
44-
true "enable for remote breakpoints and profiling"
57+
| x |
58+
"set _cacheName: for Gem to get unique id in statmon output. see http://code.google.com/p/glassdb/issues/detail?id=132"
59+
System _cacheName: ((x := '$1-' , (GsSession serialOfSession: System session) printString , '-' , System myUserProfile userId) copyFrom: 1 to: (x size min: 31)).
60+
%
61+
62+
run
63+
64+
GsProcess usingNativeCode not
4565
ifTrue: [
66+
"Enable remote Breakpoing handling"
67+
Breakpoint trappable: true.
4668
GemToGemAnnouncement installStaticHandler.
47-
Exception
48-
installStaticException:
49-
[:ex :cat :num :args |
50-
BreakpointNotification signal.
51-
"needed to avoid infinite loop when resuming from a breakpoint"
52-
ex _incrementBreakpointsToIgnore. ]
53-
category: GemStoneError
54-
number: 6005 "#rtErrCodeBreakpoint"
55-
subtype: nil.
56-
System commitTransaction ifFalse: [ nil error: 'Could not commit for GemToGemSignaling' ]].
57-
"System transactionMode: #manualBegin."
69+
System commitTransaction
70+
ifFalse: [ nil error: 'Could not commit for GemToGemSignaling' ].
71+
].
72+
73+
System transactionMode: #manualBegin.
74+
5875
Exception
5976
installStaticException:
6077
[:ex :cat :num :args |
@@ -78,11 +95,15 @@ System enableSignaledAbortError.
7895
[ true ] whileTrue: [ (Delay forSeconds: 30) wait ].
7996
] forkAt: Processor lowestPriority.
8097
98+
GsFile gciLogServer: '$1 Server started on port ', $2 printString.
99+
81100
WAGemStoneRunSmalltalkServer startGemServer: '$1' On: $2.
101+
"does not return"
82102
%
83103
run
84104
GemToGemAnnouncement uninstallStaticHandler.
85-
System beginTransaction.
105+
System inTransaction
106+
ifFalse: [ System beginTransaction ].
86107
(ObjectLogEntry
87108
fatal: '${1}_server_${2}: topaz exit'
88109
object:

repository/.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.package/monticello.meta/version merge=mcVersion
2+
*.package/*.class/methodProperties.json merge=mcMethodProperties
3+

0 commit comments

Comments
 (0)