Final Exam Preparation Flashcards
$ ( sleep 10; echo “red wire”) & (sleep 10;echo “blue wire”) &
[1] 17510
[2] 17511
$ ./autopilot.sh
How do you get autopilot.sh to run in the background and prevent “blue wire” from displaying on the terminal.
Autopilot.sh starts in the foreground.
So need to “CRTL+Z”
- suspends the process and is no asleep
Then “bg”
- sends it to the background
then kill 17511
- when using kill cmd, its “kill” and the job number
bg or bg 3
kill %2 or kill 17511
kill -9 is not required . Normal kill will allow the process to clean up after itself. But kill -9 is an immediate kill
init is usually the grandparent of most processes
the parent of init PID 1 is the kernel PID 0
when running make, an error will NOT be generated if default target is not set
default is to run the first RULE
In a Makefile, actions can be unix commands
TRUE
In a makfile, if a dependency is older than the target, then the actions in that rule will NOT be performed
only if dependency is younger than target
Level classes : constants to specify the important level of log messages ad to control which log records to report
OFF severe warning info config fine finer finest ALL
properties .config to change logging functionality without recompiling code
Even if not “logged”, log messages are still constructed even though its not shown,
Logging creates more runtime cost
creating a guarded logger can lower the runtime cost
control variable can be initialized using final keyword to have statements compiled out of program
HIERARCHY
root
attributes
elements
element is defined by having an open tag and closed tag
article should be unique and has a unique atttribute/entry. has unique “key”
Project Organization
build.xml file is high level
src folder (.java etc) bin folder (.class files) : compiled binaries
ANT build files are written in XML: convention is to vall file build.xml
Each build file contains:
A project
at least 1 target
Targets are composed of some number of tasks
Build files may also contain properties (i.e. marcos)
comments are with blocks
Project Tag is used to define the projec you wish to work with
Project tags contain 3 attributes
name: logical name for the project
default: the default target to execute
basedir : base directory for which all operations are done relative to
A description for the project can be specified from within the project tag
Properties
Similar to macros in a make file
name is how we refer to something in the build file
location is referring to the directory structure
can call location or value
reference is ${ }
can define elements in one line
including /> will open and close statement in the same line
Targets
Target tag is similar to target in Make file
Depends: similar to dependencies and dependency chains
desscription: description of waht the target does
above can be run by typing
ANT init
ANT is advanced build tool for java
properties : defining a maco or local variable
what are action tags