Dear experts:
As we replace our embedded Sparcs running Solaris with some version of
Linux, the question has been asked: What should replace our package
management? I know next to nothing about rpm and apt. We release new
software once a year or so. Any recommendations?
TIA & Cheers
I am browsing the man pages to find out how to create TCP/IP connections with the socket-, connect-, bind-, listen- and accept- functions, but could not find the information I needed from the corresponding man pages. (SuSE 9.1)
Could SuSE please include a reference to ip(7) and/or tcp(7) in the description of the 'protocol' argument in socket(2)?
Could SuSE please resolve the conflicting information between getprotoent(3) and ip(7)/tcp(7) on how to get the protocol number? Ip(7)/tcp(7) says 'protocol' should be either 0 or the macro IPPROTO_TCP, while socket(2) says 'protocol' should be gotten from the getprotoent(3) function call (which reads /etc/protocols). I would very much like to use a header file's macro IPPROTO_TCP instead of fetching a world-constant number from /etc/protocols. And it is the macros that are documented in Steven's UNIX Network Programming :-).
Could SuSE please include a reference to ip(7)/tcp(7) in the description of the 'const struct sockaddr *serv_addr' argument in connect(2)? The text "Each communications space interprets the serv_addr parameter in its own way." is not very informative. How about making a paragraph based on the following from bind(2): "The rules used in name binding vary between address families. Consult the manual entries in Section 7 for detailed information. For AF_INET see ip(7), ...".
> Regards,
> Håkon Hallingstad
> Software Developer, EDB
> +47 4789 8062
> hakon.hallingstad(a)edb.com
> www.edb.com <http://www.edb.com/>
>
>
(Sorry if this is too long for hand held chatters.)
Hi,
I am starting to program for X Window and Xt.
I am having a few problems. I have been reading extensively
several books and much internet stuff, but unfortunately most
examples are 'simple' and have limited usefullness and then
the authors jump straight into some other system such as Qt.
I would appreciate some discussion.
Thank you,
Colin
The essence of my code:
hMain = XtAppCreateShell(..., applicationShellWidgetClass, ...);
// XResizeWindow:
XtSetValues(hMain, args, NumArgs); (This works correctly.)
// add a panel:
hPanel = XtCreateManagedWidget("panel", panedWidgetClass, hMain, ...);
point A
// repeat the following paragraph as often required:
strcpy( szTemp, "File");
Menu_button[++TopMenuID] = XtCreateManagedWidget(
szTemp, menuButtonWidgetClass, hPanel, ...)
point B
Notes:
args used for Setting button size:
NumArgs = 0;
XtSetArg(args[NumArgs], XtNwidth, MenuButtonWidth); NumArgs++;
XtSetArg(args[NumArgs], XtNheight, MenuButtonHeight); NumArgs++;
lines to be placed at either point A or point B : (initially at A)
XtRealizeWidget(hMain);
XtMapWidget( hPanel );
XFlush(TheDisplay);
first problem:
Button size is ignored - Why? Sizing works okay for main window/panel.
Buttons appear full width "stacked" vertically so that the first
dominates the screen and others can be seen as edges below first:
-------------
: :
: :
: B1 : <-- this is on top
: :
: :
-------------
: B2 :
-------------
: B3 :
-------------
second question:
If I move the three lines from point A to point B then there is
a reverse stack: Why?
-------------
: B1 :
-------------
: B2 :
-------------
: :
: :
: B3 : <-- this is on top
: :
: :
-------------
third question:
If I create the buttons into the main window (not panel) thus:
Menu_button[++TopMenuID] = XtCreateManagedWidget(
szTemp, menuButtonWidgetClass, hMain, ...)
the buttons are the correct size, but all are stacked exactly on top of each
other so that only the last button is visible/accessable. Why?
fourth question:
Do you know how to (using the last version) space the buttons
uniformly across the window?
Regards,
Colin
PS: Please snip viscously after first read.
PS: I don't want a lecture on
"Why don't you use Qt, C++, Java, Basic, Pearl..."
We have been through all that, and this is a question on X Window and Xt.
It would be good to start a discussion on coding directly for X11 and maybe
we can share ideas.
Thank you.
I have written an application which treats a computer much like an appliance-
in most cases, the application will be set to automatically start whenever the
computer is turned on, and the computer will not be used for other purposes.
I'm trying to figure out how I can distribute this application so that users can
install it themselves. What are the legalities of taking a current
SUSE distribution
CD, making a few changes to it, and selling it to customers? And how do I
get the phone number of someone at Novell to ask this question of?
Or, perhaps someone has a suggestion for a novice-friendly distribution
I could use for this purpose.
Thanks.
Rich
I ended up using /usr/local/bin/job &
Thank you!
-----Original Message-----
From: Randall R Schulz [mailto:rschulz@sonic.net]
Sent: Tuesday, May 17, 2005 6:08 AM
To: suse-programming-e(a)suse.com
Subject: Re: [suse-programming-e] call a script in a script
Phil,
On Tuesday 17 May 2005 01:46, Phil Betts wrote:
> On Tuesday, May 17, 2005 2:23 AM, William A. Mahaffey III wrote:
> >Patrick B. O'Brien wrote:
> >>Using ksh.
> >>
> >>I want to call script_B from script_A.
> >>
> >>I don't not want script_A to hang around for script_B to finish.
> >>
> >>I tried bg but no joy. Script_A sits and waits for script_B to
> >> finish before moving on; which is no good. Any thoughts and thank
> >> you.
> >
> >inside script_A:
> >
> >(script_B &)
> >
> >The parentheses may not be required, my man page was for ksh on SGI,
> > I don't have it on my SuSE 8.2 box. YMMV & all that.
>
> ...
>
> The parentheses create a new process which in turn creates a new
> process for script_B (because of the &). On some systems (e.g.
> cygwin on Windows), process creation carries a hefty price. Far
> better is to use the ksh builtin exec command which replaces the
> current process (i.e. "ksh script_A") with the new process (i.e. ksh
> script_B).
True. Parentheses are not simply for grouping (as you say, they create a
sub-shell). You get simple grouping of a sequence of commands with
{curly braces}. That kind of grouping is merely syntactic (and things
like "exit" executed within them will cause the shell interpreting the
script to exit. Bailing out of a {curly brace sequence} without exiting
the shell that's executing it is what the "return" built-in is for.
While what you say about process creation (fork) in Cygwin is true, I
don't think we're really considering that here (this is a SuSE list,
after all, and Cygwin is owned by RedHat...).
> So, instead of the above, just:
>
> exec script_B
Perhaps. Keep in mind that unless the shell that invoked script_A used
"script_A &", it will end up waiting for script_B to complete. If you
want the parent of script_A to continue on after it (script_A) starts
script_B, then you must use "script_B &". "Exec script_B &" is
equivalent to "script_B &".
> ...
>
> Phil
Randall Schulz
--
To unsubscribe, email: suse-programming-e-unsubscribe(a)suse.com
For additional commands, email: suse-programming-e-help(a)suse.com
Archives can be found at:
http://lists.suse.com/archive/suse-programming-e
On Tuesday, May 17, 2005 2:23 AM, William A. Mahaffey III wrote:
>Patrick B. O'Brien wrote:
>
>>Using ksh.
>>
>>I want to call script_B from script_A.
>>
>>I don't not want script_A to hang around for script_B to finish.
>>
>>I tried bg but no joy. Script_A sits and waits for script_B to finish
>>before moving on; which is no good. Any thoughts and thank you.
>
>inside script_A:
>
>(script_B &)
>
>The parentheses may not be required, my man page was for ksh on SGI, I
>don't have it on my SuSE 8.2 box. YMMV & all that.
Whilst this will work (although I have worked on systems where the
parent process still hangs around), it's not very efficient...
The parentheses create a new process which in turn creates a new
process for script_B (because of the &). On some systems (e.g. cygwin
on Windows), process creation carries a hefty price. Far better is to
use the ksh builtin exec command which replaces the current process
(i.e. "ksh script_A") with the new process (i.e. ksh script_B).
So, instead of the above, just:
exec script_B
>From the ksh man page:
exec [argument ...](1)
If argument is given, the command specified by the arguments is
executed in place of this shell without creating a new process.
Input/output arguments can appear and affect the current process.
HTH,
Phil
--
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
The subject of the mutt command should be in quotes. Also it would be
better if you included the full path name for "answer1".
-----Original Message-----
From: robert guru [mailto:sos_linux@hotmail.com]
Sent: Tuesday, May 17, 2005 2:51 AM
To: suse-programming-e(a)suse.com
Subject: [suse-programming-e] [Suse 8.0] Send a file attachment Using
mutt in a shell script..
hallo,
I' m trying to create a shell script that search for some files named
'answer', and for each file founded, the shell script have to email it as an
attachment using the 'mutt' program.
My script is
############### the script ####################
#!/bin/bash
lancer="/usr/bin/mutt -x"
for i in $(ls -p)
do
case $i in
*/) cd $i; pth=$PWD;
for sname in $(ls)
do
case $sname in
answer*) ii=`basename $i`;
comm=$lancer" -s THE_RESULT -a
"$sname" "$ii" < a_text_file";
echo $comm;
result=`$comm`;
esac
done
cd ..;;
esac
done
########## The result of the shell script ###########
echo $comm:
---> /usr/bin/mutt -x -s THE_RESULT -a answer1 sos_linux(a)hotmail.com <
a_text_file
( for this example, the file answer1 exists in
/home/account/sos_linux(a)hotmail.com
so here $ii is sos_linux(a)hotmail.com )
result=`$comm`:
---> deadlock, this command can not be completed,(in the case of ... "$ii"
< a_text_file")
---> show the message "No recipients specified." in the case of ...
"$ii" <a_text_file" (without space between '<' and 'a_text_file')
#######################################
So what's the cure of this problem ?
Thanks.
_________________________________________________________________
Take charge with a pop-up guard built on patented Microsoft® SmartScreen
Technology
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.
--
To unsubscribe, email: suse-programming-e-unsubscribe(a)suse.com
For additional commands, email: suse-programming-e-help(a)suse.com
Archives can be found at: http://lists.suse.com/archive/suse-programming-e
hallo,
I' m trying to create a shell script that search for some files named
'answer', and for each file founded, the shell script have to email it as an
attachment using the 'mutt' program.
My script is
############### the script ####################
#!/bin/bash
lancer="/usr/bin/mutt -x"
for i in $(ls -p)
do
case $i in
*/) cd $i; pth=$PWD;
for sname in $(ls)
do
case $sname in
answer*) ii=`basename $i`;
comm=$lancer" -s THE_RESULT -a
"$sname" "$ii" < a_text_file";
echo $comm;
result=`$comm`;
esac
done
cd ..;;
esac
done
########## The result of the shell script ###########
echo $comm:
---> /usr/bin/mutt -x -s THE_RESULT -a answer1 sos_linux(a)hotmail.com <
a_text_file
( for this example, the file answer1 exists in
/home/account/sos_linux(a)hotmail.com
so here $ii is sos_linux(a)hotmail.com )
result=`$comm`:
---> deadlock, this command can not be completed,(in the case of ... "$ii"
< a_text_file")
---> show the message "No recipients specified." in the case of ...
"$ii" <a_text_file" (without space between '<' and 'a_text_file')
#######################################
So what's the cure of this problem ?
Thanks.
_________________________________________________________________
Take charge with a pop-up guard built on patented Microsoft® SmartScreen
Technology
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=ht…
Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.
Hallo,
I m a shell scripting newbie, and i m trying to create a shell script that
search for some files named 'script', those files are located in the
subdirectory of a directory named "folder", and for each file founded, i
have to show the directory (full path) where the file was founded and pipe
the file to some program.
the script must be something like that:
for each file found in the subdirectory tree of "folder"
do
"show the full path where the file was found, without the file name,
like /root/folder/images"
enter this directory already showed ($cd directory)
"pipe the file to a program"
done
Thanks for help!!
_________________________________________________________________
Scan and help eliminate destructive viruses from your inbound and outbound
e-mail and attachments.
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=ht…
Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.
Using ksh.
I want to call script_B from script_A.
I don't not want script_A to hang around for script_B to finish.
I tried bg but no joy. Script_A sits and waits for script_B to finish
before moving on; which is no good. Any thoughts and thank you.